Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * A cool page entity
- */
- component persistent="true" table="page"{
- // Primary Key
- property name="id" fieldtype="id" column="id" generator="native" setter="false";
- // Properties
- property name="book" fieldtype="many-to-one" fkcolumn="book_id" cfc="book";
- // Validation
- this.constraints = {
- // Example: age = { required=true, min="18", type="numeric" }
- };
- // Constructor
- function init(){
- return this;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement