Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Refreshing an entity with a reference to a cache-isolated entity has side-effects
Refreshing an entity with a reference to a cache-isolated entity has side-effects [message #1013426] Sat, 23 February 2013 16:23 Go to next message
Sebastian Kienzl is currently offline Sebastian KienzlFriend
Messages: 9
Registered: July 2012
Junior Member
Hello!

I've run into strange behaviour, which I want to discuss here before submitting a bug report.

I have an entity (called ItemList) that owns a collection of entities (called Entry).
Each of these Entry(s) refer to one entity (called Item) each in a non-owning way.
These Item(s) are cache-isolated i.e. have CacheIsolationType.ISOLATED set.

Now, if I refresh my ItemList and afterwards fetch the same ItemList in a different EntityManager, the references in Entry to its Item will be null!

If Item is not cache-isolated or if refresh isn't called, everything will work as expected.

I have prepared a minimal SE example, if someone feels like investigating.

Regards,
Seb

P.S.: I'm using 2.5.0M7

[Updated on: Sat, 23 February 2013 16:24]

Report message to a moderator

Re: Refreshing an entity with a reference to a cache-isolated entity has side-effects [message #1014833 is a reply to message #1013426] Tue, 26 February 2013 15:01 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Seems like a bug. Try making the ItemList and Entry ISOLATED as well (they need to be PROTECTED or ISOLATED, they cannot be SHARED).


James : Wiki : Book : Blog : Twitter
Re: Refreshing an entity with a reference to a cache-isolated entity has side-effects [message #1014888 is a reply to message #1014833] Tue, 26 February 2013 16:50 Go to previous messageGo to next message
Sebastian Kienzl is currently offline Sebastian KienzlFriend
Messages: 9
Registered: July 2012
Junior Member
Thanks!

I forgot to say: I've "worked around" it by not having Item(s) isolated at all, as having it isolated was merecly an artefact from a previous solution I had altogether dropped.

Let me know if I should provide the minimal example. Should I file a bug-report? To be honest, I was quite confused seeing so many open bugs for Eclipselink Confused

Cheers
Re: Refreshing an entity with a reference to a cache-isolated entity has side-effects [message #1016225 is a reply to message #1014888] Tue, 05 March 2013 14:44 Go to previous messageGo to next message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

If the issue still occurs on the latest release, please log a detailed bug with an example to recreate the issue.

James : Wiki : Book : Blog : Twitter
Re: Refreshing an entity with a reference to a cache-isolated entity has side-effects [message #1029599 is a reply to message #1016225] Fri, 29 March 2013 22:52 Go to previous message
Sebastian Kienzl is currently offline Sebastian KienzlFriend
Messages: 9
Registered: July 2012
Junior Member
Yes, it still occurs. I've filed a bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=404626

Regards
Previous Topic:How to persist a class which extends List<>?
Next Topic:Inheritance and TYPE
Goto Forum:
  


Current Time: Tue Mar 19 07:11:56 GMT 2024

Powered by FUDForum. Page generated in 0.01999 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top