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
Operations

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 CircularReferenceTest.zip (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 o1.next==o2 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.

Sort Order: Ascending order - Click to sort in descending order
Alexander Ley added a comment - 01/Sep/10 03:22 PM
Testcase

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