Re: problem with m:n relationship/inheritance

From: Stephen Winnall (stev..innall.ch)
Date: Sun Feb 08 2009 - 09:34:49 EST

  • Next message: puschteblume: "blank characters in field names"

    I was getting verification exceptions (note: "was"; I don't any more)
    referring to "runtimeRelationship0", which I think is what you meant
    by auto-reverse relationships. I had these in two different cases.

    The initial case was the m:n mapping. In the meantime I don't think it
    has specifically to do with m:n mappings either. The two object
    entities involved in said mapping are subclasses, so I think it had to
    do with inheritance, which is what CAY-1009 seems to be about. I fixed
    this one by removing the "mandatory" option on the appropriate
    attribute, as suggested in CAY-1009.

    The second case was another use of inheritance. It went away after I
    went with the modeller through the entire inheritance tree and removed
    relationships which weren't relevant from the root class. I think that
    was my ignorance. The difficulty that I had was in working out what
    "runtimeRelationship0" referred to. It would be more helpful for the
    naive and the ignorant like me if the exception text referred to the
    "auto-reverse relationship of X".

    I'm conscious that this won't help you much and that I am something of
    a bull in a china-shop at the moment. But the more I use Cayenne, the
    more I like it. And I appreciate your support, which I find exemplary.

    Steve

    On 8 Feb 2009, at 14:41, Andrus Adamchik wrote:

    > I am not 100% sure your problem is related to CAY-1009. IIRC
    > CAY-1009 describes a very special case that did not work. In most
    > cases n:m relationships work just fine. So can you describe your
    > problems in more detail? Anything special in your mapping that makes
    > you think it is the same problem as CAY-1009?
    >
    > Andrus
    >
    >
    > On Feb 8, 2009, at 3:03 AM, Stephen Winnall wrote:
    >
    >> I've got this error again in another part of my schema. Since I
    >> don't really understand what the cause is, I go through the
    >> attributes of the DB entity switching off the "mandatory" option
    >> and seeing if the problem goes away. Is there an easier way to
    >> recognise which attribute is causing the problem? Is it a problem
    >> with the DB entity or with the object entity?
    >>
    >> Steve
    >>
    >> On 4 Feb 2009, at 09:42, Andrus Adamchik wrote:
    >>
    >>> Yes, the issues with auto-reverse relationships need to be fixed
    >>> rather sooner than later, and to the best of my knowledge nobody
    >>> is working on it right now. But this is certainly high on the list.
    >>>
    >>> Andrus
    >>>
    >>> On Feb 3, 2009, at 11:39 PM, Stephen Winnall wrote:
    >>>
    >>>> Is CAY-1009 (Bogus runtime relationships can mess up commit) due
    >>>> for resolution any time soon? I think I've run into it whilst
    >>>> modelling an m:n relationship. The work-around (making the
    >>>> attributes in the intersect entity non-mandatory) works, but it
    >>>> would be nice to do it properly.
    >>>>
    >>>> Steve
    >>>>
    >>>>
    >>>
    >>
    >>
    >



    This archive was generated by hypermail 2.0.0 : Sun Feb 08 2009 - 09:35:45 EST