Issue Details (XML | Word | Printable)

Key: NUCCORE-823
Type: Improvement Improvement
Status: Closed Closed
Resolution: Duplicate
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 Core

Change SCO backing store for List to not do clear/addAll on an update to a collection

Created: 19/Mar/12 07:13 PM   Updated: Wednesday 05:27 PM   Resolved: 01/Dec/14 09:39 AM
Component/s: Java Types, Persistence
Affects Version/s: None
Fix Version/s: None


 Description  « Hide
When a user has a Collection field and calls
entity.setCollection(newCollection);

this currently creates the SCO (with backing store) and then does a
clear();
addAll(newCollection);

This is firstly inefficient, and secondly can result in objects being deleted unecessarily when we have dependent elements. Obviously working out the most optimum order of additions/sets/deletions for a List is non-trivial

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 01/Dec/14 09:39 AM
Dup of NUCCORE-1268. All comments can go on that issue