[
https://issues.apache.org/jira/browse/OPENJPA-813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Zowalla resolved OPENJPA-813.
-------------------------------------
Resolution: Won't Fix
Closing as obsolete during backlog cleanup: The reporter could not reproduce it
and gave no test case for the 2008 Slice code, so nobody can act on it. Please
reopen if this still happens with OpenJPA 4.x.
> slices: em.getReference somewhat buggy
> --------------------------------------
>
> Key: OPENJPA-813
> URL: https://issues.apache.org/jira/browse/OPENJPA-813
> Project: OpenJPA
> Issue Type: Bug
> Components: slice
> Affects Versions: 2.0.0-M2
> Reporter: Fernando Padilla
> Assignee: Pinaki Poddar
> 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 was sent by Atlassian Jira
(v10.3.26#10030026)