cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: CAY-1378, CAY-1009...
Date Wed, 10 Feb 2010 08:53:05 GMT

On Feb 9, 2010, at 2:11 PM, Andrey Razumovsky wrote:

> Correcting my case, there's relationship between B and C, not A and C.


If I set B -> C and C -> B relationships, it works with CAY-1009  
reverted. It fails if there is a mismatch between forward and reverse  
relationships like this: A -> C ; C -> B. This is indeed same as  
Kevin's case, and I just uploaded another patch demonstrating it. The  
validation error happens if the object is added for to-many:

    b.addToRelated(c);

And this comes down to my earlier comment - if we are to handle  
multiple permutations of object relationships over the same db path,  
we need to rewrite the algorithm for reverse lookup (and maybe even  
add other matching forward relationships to the mix during auto-update).

I.e. this is not something we can do in 3.0 at this point, but  
definitely something to consider in 3.1.

Now back to 3.0... Could you explain why there is a mismatch in the  
mapping? I.e. why can't you remap (A -> C ; C -> B) as either (A ->  
C ; C -> A) or (B -> C ; C -> B) from the application design  
perspective?

Andrus

Mime
View raw message