Advertisement
Guest User

Untitled

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