openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <>
Subject [jira] Assigned: (OPENJPA-813) slices: em.getReference somewhat buggy
Date Sat, 20 Dec 2008 06:59:44 GMT


Pinaki Poddar reassigned OPENJPA-813:

    Assignee: Pinaki Poddar

> slices: em.getReference somewhat buggy
> --------------------------------------
>                 Key: OPENJPA-813
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: slice
>    Affects Versions: 2.0.0
>            Reporter: Fernando
>            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 is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message