Hi Rashid,
(seems like you are not subscribed to the list, so you won't get
responses, not cc'd to you directly)
Generally "to dep pk" is disabled if Cayenne thinks that the target
and/or source columns of the relationships are not PK, so doublecheck
that PK is checked on attributes on both ends.
Also there was a bug that I recently fixed [1] that may be related,
so could you try the Modeler from the latest nightly build [2]. Let
us know if any of that worked.
Andrus
[1] http://issues.apache.org/cayenne/browse/CAY-566
[2] http://objectstyle.org/downloads/cayenne/nightly/?M=D
On Jun 18, 2006, at 2:11 PM, Rashid Khan wrote:
> Hello there,
>
> I am using Cayenne1.2RC1. I am facing problems with the
> CayenneModeler "To
> Dep PK" checkbox.
>
> I have the following database set up:
>
> * User table
> * Group table
> * UserGroup table (join table: maps users to groups)
>
> From what I understand the way cayenne works, I have to check the
> "To Dep
> PK" checkbox in the UserGroupArray relationship of the User db-
> entity (and
> the same with the UserGroupArray relationship of the Group db-entity).
> However, the checkbox in the Modeler is disabled.
>
> When I manually edit the dataMap.map.xml file to set the
> "toDependentPK=true" for the respective relationships, my
> application works
> fine. But a problem occurs when I open the cayenne.xml file again
> in the
> modeler.
>
> Initially, the "To Dep PK" checkbox shows checked as I specified
> manually in
> the map.xml file. However, when I save the cayenne.xml file again, the
> "toDependentPK=true" gets erased from the map.xml file and, as a
> result, I
> don't see the "To Dep PK" checkboxes checked anymore in the Modeler.
>
> Please tell me what is the workaround for this, as it is very
> critical for
> me to set up the relationships correctly.
>
> Sincerely,
>
> Rashid Khan
This archive was generated by hypermail 2.0.0 : Sun Jun 18 2006 - 09:02:37 EDT