slices: em.getReference somewhat buggy
--------------------------------------
Key: OPENJPA-813
URL: https://issues.apache.org/jira/browse/OPENJPA-813
Project: OpenJPA
Issue Type: Bug
Components: kernel
Affects Versions: 2.0.0
Reporter: Fernando
Priority: Minor
It's hard for me to reproduce, but wanted to post a bug, to slowly build any
evidence we can find to fix this bug.
I used to do lots of em.getReference (because I got confused, and used that
instead fo em.find). In non-slice code, it worked perfectly fine. But when I
used slices, it would fail, but not in a very predictable/reproducable manner.
let me try to explain. Here is some code that failed for me:
Team team = em.getReference( teamId );
String name = team.getFullName();
I would get a reference to the Team object. And even at the next line, when I
tried to access a field from that object, it would throw an exception,
complaining that the object did not exist any longer. For some reason it did
not find the object. So I tried this:
Team team = em.getReference( teamId );
log().debug( "SLICE: "+SlicePersistence.getSlice( team ) );
String name = team.getFullName();
And it said "SLICE: null". So my only clue is that the slice was not set
properly for references, so that they might fail in a later time..
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.