I've reverted CAY-1009 and reproduced problem in one of my projects. It's
exactly as in Kevin's scenario. Correcting my case, there's relationship
between B and C, not A and C.
Could you upload your patch in svn format? I'm afraid I don't have git
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 : Tue Feb 09 2010 - 07:12:06 EST