Issue Details (XML | Word | Printable)

Key: NUCNEODATIS-18
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Andy Jefferson
Votes: 0
Watchers: 0
Operations

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

Attach of object graph can result in persist of DataNucleus wrapper types into datastore

Created: 11/Sep/08 01:57 PM   Updated: 11/Sep/08 01:57 PM
Component/s: Persistence
Affects Version/s: 1.0.0.final
Fix Version/s: None


 Description  « Hide
When we have an object graph and we want to attach, the AttachFieldManager will navigate to the leaf object in the tree and insert/update it, then the one before, then the one before etc. This means that each time we call updateObject() a call is made to NeoDatis
odb.store(obj);
which persists down the object graph. The problem is that related objects will have SCO wrappers, and so they will be persisted (since NeoDatis doesn't allow persist of a single object without persisting its relations).

What the solution is is not clear since attaching is handled by the StateManager and doesn't allow the datastore knowledge of what is the primary object. We could add a FieldManager to unwrap all SCO fields in a graph from an object, and then add a FieldManager to re-wrap all SCO fields in a graph from that object. This could be inefficient on a large graph.

Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.