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).

Sort Order: Ascending order - Click to sort in descending order
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).