Re: Documentation on Modeler - Relationships

From: Jin Lee (jinsle..mail.com)
Date: Wed Jan 12 2005 - 21:14:55 EST

  • Next message: Joshua Pyle: "Re: Question about the deleteObject call of DataContext"

    Todd,

    Thanks for the info. I didnt realize that you have to map them in the
    DBEntity. Just a couple questions if you don't mind me asking:

    Why is the reverse relationship required? Is it a normal requirement
    of OR frameworks or specific to cayenne?
    Do I need to sync the reverse mapping as well?

    Did everything else and it worked perfectly. Thanks again!

    Jin

    On Wed, 12 Jan 2005 20:51:40 -0500, Todd O'Bryan <toddobrya..ac.com> wrote:
    > Create an attribute to hold the ServiceRequest id field in the
    > ServiceItem table. Once you have this, create a relationship and click
    > on Database Mapping. Map the id field in ServiceItem to the (hopefully
    > auto-generated) id field in ServiceRequest. Also, make sure you name
    > the reverse relationship since it currently must exist.
    >
    > In the ObjEntity that's attached to the table, choose Sync ObjEntity to
    > DBEntity and you should be good to go. The relationship from
    > ServiceRequest should return a List of ServiceItems and the reverse
    > relationship from ServiceItem should return a single ServiceRequest.
    > And the "to many" checkbox should be checked automatically as
    > appropriate.
    >
    > Let me know if I need to be more clear,
    > Todd
    >
    > On Jan 12, 2005, at 8:38 PM, Jin Lee wrote:
    >
    > > Hey guys,
    > >
    > > Newbie question: Where can I find information on how to use the
    > > modeler to set up relationships between tables?
    > >
    > > I have two tables, ServiceRequest and ServiceItem. ServiceRequest has
    > > one to many ServiceItems. I tried to set this up but for some reason
    > > the modeler would not let me check the "To Many" box, which I am just
    > > assuming is the right thing to do.
    > >
    > > Any help?
    > >
    > > Thanks all,
    > >
    > > Jin Lee
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Jan 12 2005 - 21:14:57 EST