Issue Details (XML | Word | Printable)

Key: NUCCORE-822
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
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 Set to not do clear/addAll on an update to a collection

Created: 19/Mar/12 03:48 PM   Updated: 30/Mar/12 09:25 AM   Resolved: 19/Mar/12 07:15 PM
Component/s: Java Types, Persistence
Affects Version/s: None
Fix Version/s: 3.0.10, 3.1.0.m2


 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.

Andy Jefferson made changes - 19/Mar/12 07:13 PM
Field Original Value New Value
Summary Change SCO backing store for Set/List to not do clear/addAll on an update to a collection Change SCO backing store for Set to not do clear/addAll on an update to a collection
Andy Jefferson added a comment - 19/Mar/12 07:15 PM
SVN trunk and branches/3.0 fix this, doing individual add/remove for the affected elements

Andy Jefferson made changes - 19/Mar/12 07:15 PM
Status Open [ 1 ] Resolved [ 5 ]
Assignee Andy Jefferson [ andy ]
Fix Version/s 3.0.10 [ 11501 ]
Fix Version/s 3.1.0.m2 [ 11506 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 30/Mar/12 09:25 AM
Status Resolved [ 5 ] Closed [ 6 ]