blob: bc231f2cc247ab04ae4f359b0db982fe8b5ab371 [file] [log] [blame]
Title: To Dep PK Checkbox
<H3><A name="ToDepPKCheckbox-%22ToDepPK%22Checkbox"></A>&quot;To Dep PK&quot; Checkbox</H3>
<P>Some DB relationships consist only of the primary key columns of the participating tables. Examples of such relationships are:</P>
<UL>
<LI>One-to-one relationship between master and detail tables.</LI>
<LI>One-to-many relationship between each main table and a join table in a many-to-many relationship spanning three tables.</LI>
</UL>
<P>Normally one side of the relationship is considered &quot;master&quot; and another one - &quot;dependent&quot;, meaning that &quot;dependent&quot; part can not exist without a corresponding &quot;master&quot; record, while &quot;master&quot; record can exist without any dependents. This fact is reflected in Cayenne mapping. DbEntity &quot;Relationships&quot; panel contains &quot;To Dep PK&quot; column. The checkboxes in this column are disabled, unless the relationship only consists of the PK attributes. If this is the case, you must select the relationship going in the direction from &quot;master&quot; to &quot;dependent&quot; and check the &quot;To Dep PK&quot; checkbox on this relationship. Otherwise Cayenne will not be able to handle such relationship properly.</P>