Issue Details (XML | Word | Printable)

Key: NUCCORE-513
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Marco Schulze
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Core

JDOHelper.getVersion(...) can be null on calling pm.getObjectById when the object has no non-PK fields

Created: 20/Apr/10 07:13 PM   Updated: 04/Oct/12 05:02 PM   Resolved: 20/Apr/10 08:29 PM
Component/s: Persistence
Affects Version/s: 2.0.0.release, 2.0.1, 2.0.2, 2.0.3, 2.1.0.m1
Fix Version/s: 2.0.4, 2.1.0.m2

Forum Thread URL: http://www.jpox.org/servlet/forum/viewthread_thread,6076
Severity: Development


 Description  « Hide
When getting objects via PersistenceManager.getObjectsById(...) and using 2nd level cache, the method JDOHelper.getVersion(...) returns null for objects that were persisted in a previous session.

Here's a test: http://www.nightlabs.de/~marco/datanucleus/2010-04-20.00/

I have the impression, that it happens sometimes with objects being persisted in the same session, too, but I was not able to reproduce it in my test (probably due to garbage collection happening in the real environment but not in this little test).

Andy Jefferson made changes - 20/Apr/10 08:29 PM
Field Original Value New Value
Summary JDOHelper.getVersion(...) sometimes returning null JDOHelper.getVersion(...) can be null on calling pm.getObjectById when the object has no non-PK fields
Assignee Andy Jefferson [ andy ]
Fix Version/s 2.0.4 [ 10921 ]
Fix Version/s 2.1.0.m2 [ 10901 ]
Affects Version/s 2.0.3 [ 10907 ]
Affects Version/s 2.0.2 [ 10874 ]
Affects Version/s 2.0.1 [ 10835 ]
Affects Version/s 2.0.0.release [ 10703 ]
Component/s JDO [ 10201 ]
Component/s Persistence [ 10200 ]
Andy Jefferson added a comment - 20/Apr/10 08:29 PM
SVN trunk and branches/2.0 have this. Only happened when using pm.getObjectById() and the object had no non-PK DFG fields (if it had then the version would have got loaded with them).

Andy Jefferson made changes - 20/Apr/10 08:29 PM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 26/Apr/10 03:37 PM
Status Resolved [ 5 ] Closed [ 6 ]
Andy Jefferson made changes - 04/Oct/12 05:02 PM
Component/s JDO [ 10201 ]