From f5b0a7c2749afc853a0b7c5b8945ae44120fc4a1 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Sun, 3 Sep 2006 23:23:51 +0000 Subject: More tests and fixes. --- src/test/java/com/amazon/carbonado/repo/toy/ToyStorage.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/test/java/com/amazon/carbonado/repo') 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 implements Storage, 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; } } -- cgit v1.2.3