summaryrefslogtreecommitdiff
path: root/src/test/java/com/amazon/carbonado/repo/toy
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/amazon/carbonado/repo/toy')
-rw-r--r--src/test/java/com/amazon/carbonado/repo/toy/ToyStorage.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/java/com/amazon/carbonado/repo/toy/ToyStorage.java b/src/test/java/com/amazon/carbonado/repo/toy/ToyStorage.java
index 01f9fbf..84792ad 100644
--- a/src/test/java/com/amazon/carbonado/repo/toy/ToyStorage.java
+++ b/src/test/java/com/amazon/carbonado/repo/toy/ToyStorage.java
@@ -147,11 +147,16 @@ public class ToyStorage<S extends Storable> implements Storage<S>, MasterSupport
try {
for (S existing : mData) {
if (existing.equalPrimaryKeys(storable)) {
+ // Copy altered values to existing object.
existing.markAllPropertiesDirty();
storable.copyAllProperties(existing);
existing.markAllPropertiesClean();
+
+ // Copy all values to user object, to simulate a reload.
+ storable.markAllPropertiesDirty();
existing.copyAllProperties(storable);
storable.markAllPropertiesClean();
+
return true;
}
}