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

From: Andrey Razumovsky (razumovsky.andre..mail.com)
Date: Mon Feb 08 2010 - 01:42:26 EST

  • Next message: Kevin Menard: "Re: CAY-1378, CAY-1009..."

    I'll check an old project of mine to see what mapping causes the error.
    BTW I've found another issue (CAY-1386) related to reverse rels. Do we have
    reverses for flattened rels?

    2010/2/7 Andrus Adamchik <andru..bjectstyle.org>

    >
    > 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
    >

    -- 
    Andrey
    



    This archive was generated by hypermail 2.0.0 : Mon Feb 08 2010 - 01:43:20 EST