Guest User

Untitled

a guest
Nov 26th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2. * A cool book entity
  3. */
  4. component persistent="true" table="book"{
  5.  
  6.     // Primary Key
  7.     property name="id" fieldtype="id" column="id" generator="native" setter="false";
  8.     property name="name" default="";
  9.    
  10.     // Properties
  11.    
  12.    
  13.     // Validation
  14.     this.constraints = {
  15.         // Example: age = { required=true, min="18", type="numeric" }
  16.     };
  17.    
  18.     // Constructor
  19.     function init(){
  20.        
  21.         return this;
  22.     }
  23. }
Add Comment
Please, Sign In to add comment