Re: flattened relations intermediate table records not deleted with cascade

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Dec 23 2004 - 11:59:46 EST

  • Next message: Andrus Adamchik: "Re: [Fwd: Re: Problem Inheritance and casting]"

    Hi Dmitry,

    Please disregard my earlier comment about bidirectional Cascade rule, I
    simply needed more coffee.

    Looking at the mapping that you sent me in a second message.... Here is an
    easy way to fix it. In the Modeler make page_child.page_id a PK column and
    check "to dep pk" on page.childPagesArray relationship.

    I guess we may redefine "to dep PK" meaning at some point to indicate
    "relationship pointing to a dependent record", even if the target column
    is not a PK...

    A general question - why do you need a join table for a one-to-many
    relationship? Is this a legacy schema?

    Andrus

    > Hi everyone,
    >
    > I have a flattened relation for pages tree (Page -> Page_Child -> Page)
    > and a cascase delete rule works fine for deleting child pages for a
    > parent node but the records in Page_Child (with fields id, page_id,
    > child_page_id) remain. Is this a normal behaviour? I'd like these
    > records to be cleaned up too.
    >
    > Thank you.
    > Dmitry.



    This archive was generated by hypermail 2.0.0 : Thu Dec 23 2004 - 11:59:48 EST