Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] NullPointerException in sequence of persistent property mutations

I am not sure what the intention of the spec is, however, as noted in the bug we do have to merge the association itself (but not the object).  I am not sure how we would do any kind of a clone operation on an object that may be mapped and may not be.  (i.e. it is reasonable for us to assume that the object assigned to a mapped instance variable is mapped in our persistence unit)

-Tom

On 06/09/2013 9:24 AM, Laird Nelson wrote:
On Fri, Sep 6, 2013 at 6:07 AM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
  I think what your seeing is related to this issue:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=247662

  Are you doing a merge?

No, a persist().  Though I'm sure a merge() would do it as well.

I'm discovering that Entities from persistence unit A had better not reference in any way, shape or form Entities from persistence unit B while in flight, even if such relationships are not cascaded.  That is extremely surprising, and surely can't be the intention of the spec.

That is, if I have a Child with a many-to-one with a Parent, and if Child and Parent are from two different persistence units, then I cannot invoke persist()/flush() on the Child, even if the relationship to Parent is not cascaded.

Best,
Laird

--
http://about.me/lairdnelson


_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top