DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Key: NUCCORE-558
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Alexander Ley
Votes: 0
Watchers: 0

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

Circular reference leads to duplicate objects if queried with fetch groups

Created: 01/Sep/10 03:22 PM   Updated: 10/Dec/10 07:48 AM   Resolved: 26/Nov/10 11:13 AM
Component/s: Cache
Affects Version/s: 2.2.0.m1
Fix Version/s: 2.2.0.release

File Attachments: 1. Zip Archive (3 kB)

Environment: Oracle 10g

Datastore: Oracle

 Description  « Hide
PersistenceCapable class CircRef { int id; CircRef next; CircRef prev; }

2 persistent objects (rows) CircRef o1 and CircRef o2 with and o2.prev==o1 in the database.

If you query the 2 rows you get 2 objects in memory - all ok.

If you query the 2 rows with fetchgrous set for prev and next you get 3 objects in memory with o2.prev!=o1.
o2.prev should be set to o1 from the cache, not to a new object.

Alexander Ley added a comment - 01/Sep/10 03:22 PM

Alexander Ley made changes - 01/Sep/10 03:22 PM
Field Original Value New Value
Attachment [ 11243 ]
Andy Jefferson added a comment - 26/Nov/10 11:13 AM
SVN trunk puts all newly created objects in the L1 cache prior to processing of their fields so always findable thereafter

Andy Jefferson made changes - 26/Nov/10 11:13 AM
Status Open [ 1 ] Resolved [ 5 ]
Assignee Andy Jefferson [ andy ]
Fix Version/s 2.2.0.release [ 10931 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 10/Dec/10 07:48 AM
Status Resolved [ 5 ] Closed [ 6 ]