Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] lazy loading overrides attached object

Hi Christopher,

Thank you very much for this input, even though I don't like this tradeoff that Cascade.REFRESH even means if the refresh is implicit as in this case.

One more information: With EclipseLink 2.3.2 the B instance was not refreshed implicitely. Just after we upgraded to 2.4.2 this problem did come up.

Best regards
... Michael

Check that you have not done a refresh on B and that the mappings
involved are not marked to cascade the refresh. If B was refreshed by
any means, it will cascade over to the A when the relationship is
triggered, which will in turn cascade the refresh over the
relationship of Bs if it has also been set, wiping out changes.

If this is occurring, do not use cascade refresh or cascade all
settings on the affected mappings, especially lazy mappings.

On 2013-06-13, at 5:28 PM, Michael Hoennig <michael@xxxxxxxxxx> wrote:

Hi everybody,

Ever anybody had such a situation:

- A with @OneToMany EAGER to B
- B with @ManyToOne LAZY to A
(yes, other than usual, but with good reason in this case)

And now this situation:
- some B is retrieved separately, modified and still attached
- now we navigate to its A, thus all B are loaded EAGERLY
- this loading includes the B which is still attached
- and the modification is overridden by the EAGER loading!

Thanks for any hints!
... Michael

--
http://michael.hoennig.de

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

--
http://michael.hoennig.de


Back to the top