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

On Fri, Sep 6, 2013 at 8:38 AM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
  The line from the spec is here:

"If X is an entity merged to X', with a reference to another entity Y, where cascade=MERGE
or cascade=ALL is not specified, then navigation of the same association from X' yields a
reference to a managed object Y' with the same persistent identity as Y."

Sure, on a merge().  What about on a persist()?  Or is it implicitly understood that persist() is just a special form of merge()?  Section 3.2.2 is quite different from section 3.2.7.1.
 
The spec asks us to create a Y' and we need a way to do it.  I suspect what other providers do comes down to a combination of how they have interpreted the spec, and what is tested in the TCK.

Having said that, I think there is an argument that there should be a way to indicate that an object should not be touched by a merge and perhaps the lack of CASCADING combined with a read-only setting would be a good way to determine that.  Please feel free to enter an enhancement request for this behavior.

Thanks; I will.

Best,
Laird

--
http://about.me/lairdnelson

Back to the top