Re: CAY-1378, CAY-1009...

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Feb 07 2010 - 12:24:05 EST

  • Next message: Andrey Razumovsky: "Re: CAY-1378, CAY-1009..."

    On Feb 7, 2010, at 5:36 PM, Andrey Razumovsky wrote:

    > As far as i remember, the problem is if we have a mapping:
    > entities:
    > A
    > B extends A - mapped in same db table
    > C
    >
    > dbRel:
    > toA, cArray (from C to A and vice versa) - Is Mandatory
    >
    > objRel - toA, cArray (from C to A and vice versa)
    >
    > So, there's isn't any ObjRel from B to C and therefore Cayenne adds
    > runtime
    > relationship.
    > Problems come when we're setting relationship via C.setToA(..) and
    > commit.
    > Cayenne thinks runtime rel from C to B is mandatory (after all, it's
    > mapped
    > to mandatory dbRel) and fails to commit.

    Created a patch from this description against 3.0 branch:

    https://issues.apache.org/jira/secure/attachment/12435122/CAY-1009-Andreys-case.patch

    A == Sti2Inheritance
    B == Sti2InheritanceSub
    C == Sti2Related

    I still can't reproduce the failure, as there's no runtime
    relationship created between B and C, either with or without CAY-1009
    commit.

    Andrus



    This archive was generated by hypermail 2.0.0 : Sun Feb 07 2010 - 12:24:39 EST