blob: 325d98d945251a13a25fa062c911cb168f39ef6e [file] [log] [blame]
Title: Modeling Tips
<P>This section contains a few unorganized tips on Object/Relational modeling in Cayenne. Some of these tips may become obsolete in the future as the Modeler evolves, making many things more transparent to the user.</P>
<UL>
<LI>Pay attention to validation messages when saving the project, this helps preventing lots of runtime errors. Click on the error message to go to the problem spot.</LI>
<LI>All DbRelationships must have reverse relationships.</LI>
<LI>You do not need to map meaningless primary key columns (like autogenerated sequential numbers) to ObjAttributes. Unless you absolutely need them, exclude them from the object model, and Cayenne will do the right thing for you.</LI>
<LI>Even if you work with an existing database schema, special database objects may need to be created to support automated primary key generation.</LI>
<LI>Display order of attributes and relationships is alphabetic and does not affect Cayenne runtime behavior.</LI>
<LI>Display order of Procedure Parameters is important - this is the order in which stored procedure parameters will be bound. Use &quot;Up&quot; and &quot;Down&quot; buttons in the bottom of the &quot;Parameters&quot; tab to change parameter position.</LI>
</UL>