Re: identity tables

From: Michael Lepine (mikelepin..mail.com)
Date: Wed Mar 21 2007 - 11:55:51 EDT

  • Next message: Török Péte: "Source code in jar?"

    This is great (and the type of mapping I was hoping for). Thanks for the
    link and the help.

    On 3/21/07, Tore Halset <halse..vv.ntnu.no> wrote:
    >
    > Hello.
    >
    > We call this a flattened many to many relationship.
    >
    > http://cayenne.apache.org/doc20/cayennemodeler-flattened-
    > relationships.html
    >
    > After flattening you will be able to call city.getStates() and so on.
    >
    > Regards,
    > - Tore.
    >
    > On Mar 21, 2007, at 16:20, Michael Lepine wrote:
    >
    > > Hello all. I am a fairly new user of Cayenne and am trying to get more
    > > familiar with the API and modeler. My question deals with an
    > > identity table.
    > > I have not seen any documentation (or examples in the
    > > documentation) dealing
    > > with this issue, which is why I'm posting to the list.
    > >
    > > As an example, let's say I have three tables: city, state and
    > > city_state,
    > > where the city_state table is merely an identity table composed of
    > > foreign
    > > keys to the city and state tables.
    > >
    > > In my application, if I know the primary key for a state record,
    > > what would
    > > be the best way to retrieve all the city records associated with it?
    > >
    > > Thanks for any advice.
    > >
    > > - Mike
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Mar 21 2007 - 11:56:29 EDT