Re: Read-only many to many

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Jun 10 2005 - 11:55:57 EDT

  • Next message: Nick Stuart: "Re: Read-only many to many"

    Nick,

    "to dep pk" has to be the other way around. What it means is that MASTER
    table propagates its PK to its DEPENDENT table. "tapn_users" and
    "tapn_forum" are both masters and "tapn_fmoderators" is a dependent table.

    BTW, if anybody can suggest a better name for this flag (or maybe a
    suggestion how to improve UI that sets it), please post your suggestions.
    While "to dep pk" is technically correct, it does cause confusion.

    Andrus

    > Just tried it, and nothing.
    >
    > Attaching the map file.
    >
    > Thanks again,
    > -Nick
    >
    > On 6/10/05, Andrus Adamchik <andru..bjectstyle.org> wrote:
    >> Hi Nick,
    >>
    >> Do you have "To Dep PK" checked for these two relationships:
    >>
    >> Forum->join table
    >> User -> join table
    >>
    >> If this doesn't help, please send your *.map.xml file - it may give some
    >> clues.
    >>
    >> Andrus
    >>
    >> > Ok, so I'm a newb to Cayenne and this has probably already been
    >> > answered, but since i can't find a searchable list archive anywhere,
    >> > here goes.
    >> >
    >> > I've got a many-to-many relationship I'm trying to build and it looks
    >> > like everything is working, but the classes generated only let me get
    >> > the list and not add to them. I've got a join table and relationship
    >> > to both ids and all the chained joins appear to be setup correctly in
    >> > the objects, but still no love.
    >> >
    >> > What am I missing to be able add to the join table? I've tried just
    >> > about every combo I can come up with, but there must be something.
    >> > BTW, this is with 1.2M4.
    >> >
    >> > This is a simple mapping:
    >> > Users can be moderators of several Forums
    >> > Forums can have several User moderators
    >> >
    >> > Join table with userId and forumId
    >> > user relationship going from the join table userId to user table Id
    >> > same for forums.
    >> >
    >> > Chained relations
    >> > Forum->join table -> user table
    >> > User -> join table -> forum table
    >> >
    >> > Thanks for the help!
    >> > -Nick
    >> >
    >>
    >>
    >



    This archive was generated by hypermail 2.0.0 : Fri Jun 10 2005 - 11:55:58 EDT