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

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Feb 10 2010 - 03:53:05 EST

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

    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



    This archive was generated by hypermail 2.0.0 : Wed Feb 10 2010 - 03:53:41 EST