Re: Relationships between DataMaps in the same DataDomain

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu May 26 2005 - 13:26:20 EDT

  • Next message: Mike Kienenberger: "Re: Relationships between DataMaps in the same DataDomain"

    Yeah, Cayenne supports cross-model relationships within domain. If it
    behaves like it doesn't I'd treat it as a bug.

    Andrus

    > Are relationships between two datamaps in the same datadomain supported?
    >
    > The modeler seems to (mostly) think that they are, in that I can set up
    > DbRelationships and ObjRelationships to a second map in my first map.
    >
    > However, if I set up a "user" ObjRelationship on "Rank" to target
    > "SEC_INDIVIDUAL (AdminDb)", I get warnings like "ObjectRelationship
    > <Rank.role> has no DbRelationship mapping.", and my map contains entries
    > like:
    >
    > <db-relationship name="role" source="RANK" target="SEC_ROLE"
    > toMany="false">
    >
    > <db-attribute-pair source="ROLE_ID" target="ID"/>
    > </db-relationship>
    >
    > And it kills cgen when I try to generate my class files, probably
    > because it can't find SEC_ROLE, since cgen only has access to one of
    > the datamaps.
    >
    > I'm ok with either hand-fixing these problems, or extending cgen to
    > support it better, but before I do that, I'd like to know that Cayenne
    > really does support this already. :)
    >
    > -Mike



    This archive was generated by hypermail 2.0.0 : Thu May 26 2005 - 13:26:22 EDT