Issue Details (XML | Word | Printable)

Key: NUCCORE-803
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

Backed SCOs for Lists/Sets/Maps ought to have makeDirty and delegate update before any backing store usage for clear/removeAll

Created: 18/Jan/12 09:51 AM   Updated: 06/Feb/12 10:13 AM   Resolved: 18/Jan/12 10:16 AM
Component/s: Java Types
Affects Version/s: None
Fix Version/s: 3.0.6


 Description  « Hide
When we have a backed SCO wrapper for a Collection/Map the clear/removeAll methods currently mark the owner as dirty, yet don't update the delegate immediately. This has the result that the backing store is called, and this can trigger a flush of the owner. For RDBMS there is no problem, but for datastores that are persisting the delegate into the owning record this means we lose the update (doesn't have the change in the delegate to store, and ends up setting the field to the same value as before).

Andy Jefferson added a comment - 18/Jan/12 10:16 AM
SVN trunk now puts delegate updates next to calls to makeDirty so all datastores can handle such updates correctly

Andy Jefferson made changes - 18/Jan/12 10:16 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Assignee Andy Jefferson [ andy ]
Fix Version/s 3.0.6 [ 11420 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 06/Feb/12 10:13 AM
Status Resolved [ 5 ] Closed [ 6 ]