RE: Reverse relationships and registeration

From: Gentry, Michael \(Contractor\) ("Gentry,)
Date: Fri Sep 09 2005 - 14:03:36 EDT

  • Next message: Andrus Adamchik: "Re: Reverse relationships and registeration"

    Was B ever in A's DataContext?

    -----Original Message-----
    From: Gili [mailto:cowwo..bs.darktech.org]
    Sent: Friday, September 09, 2005 1:56 PM
    To: cayenne-use..bjectstyle.org
    Subject: Reverse relationships and registeration

    Hi,

            I get a NullPointerException under the following situation

    A registers with the context
    A.setRelationship(B) // where B is transient
    A.setRelationship(C) // where C is commited

            now in the last step, Cayenne tries to undo the reverse
    relationship
    (CayenneDataObject.java line 376 eventually leading to line 461), but
    because B is transient "dataContext" is null and an exception is thrown.

            I assume a workaround would be to explicitly initialize the
    relationship object, but I just thought I should point this out because
    I think Cayenne 1.2 is supposed to handle these sorts of things. Should
    I file a JIRA issue for it?

    Gili

    -- 
    http://www.desktopbeautifier.com/
    



    This archive was generated by hypermail 2.0.0 : Fri Sep 09 2005 - 14:03:40 EDT