| 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>TO-ONE ObjRelationships do not require reverse relationships to work, but TO-MANY currently do.</LI> |
| <LI>Do not map meaningless primary key DbAttributes (like autogenerated sequential numbers) to ObjAttributes. Simply exclude them from the object model, Cayenne will do the right thing for you.</LI> |
| <LI>Do not forget that 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 "Up" and "Down" buttons in the bottom of the "Parameters" tab to change parameter position.</LI> |
| </UL> |
| |