Re: New objects break FK constraints

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Jan 29 2004 - 20:53:09 EST

  • Next message: Andriy Shapochka: "Re: New objects break FK constraints"

    On Jan 29, 2004, at 8:35 PM, Jim Menard wrote:

    > Andrus,
    >
    > Thanks for researching this and figuring out that the cycle is the
    > problem. That makes sense.
    >
    >> But regardless of this limitation, I think the schema can be
    >> redesigned to remove the cycle. member.bill_account_id can be
    >> substituted with bill_account.member_id. If I understand it
    >> correctly, a bill_account always belongs to a single member, right?
    >> It is not shared by multiple people?
    >
    > Unfortunately, a bill account has one or more members. Each member has
    > to have a bill account, but more than one can point to the same bill
    > account. (One member is the designated "owner" of the bill account,
    > but that's taken care of with another unrelated MemberRole
    > relationship).

    I see. Then I guess you may try deferred constraints approach (see my
    other message on the topic) - if it works as advertised this will solve
    the problem in a clean way without sacrificing any functionality.

    Andrus



    This archive was generated by hypermail 2.0.0 : Thu Jan 29 2004 - 20:53:16 EST