diff options
| author | Brian S. O'Neill <bronee@gmail.com> | 2007-02-02 04:22:35 +0000 |
|---|---|---|
| committer | Brian S. O'Neill <bronee@gmail.com> | 2007-02-02 04:22:35 +0000 |
| commit | 7bbd2669edfb3bd9c439e70609ddf52a661bc25f (patch) | |
| tree | ae5427484e647f5c7c481868de5e27d6f0a8e4cd /src | |
| parent | 6513a04b24db5d2e7fc2b62ecadb8a2becedffc4 (diff) | |
Fixed bug when decoding old Storable generations - new properties must be cleared. Otherwise, indexes on newly added properties might not get updated.
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/java/com/amazon/carbonado/layout/TestLayout.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/java/com/amazon/carbonado/layout/TestLayout.java b/src/test/java/com/amazon/carbonado/layout/TestLayout.java index 7af8758..47931af 100644 --- a/src/test/java/com/amazon/carbonado/layout/TestLayout.java +++ b/src/test/java/com/amazon/carbonado/layout/TestLayout.java @@ -90,6 +90,7 @@ public class TestLayout extends TestCase { protected void tearDown() throws Exception {
mRepository.close();
mRepository = null;
+ mFactory = null;
}
public void testBasic() throws Exception {
@@ -376,6 +377,12 @@ public class TestLayout extends TestCase { stm.setId(2);
stm.load();
assertEquals(200, ((Integer) bean.getPropertyValue(stm, "prop0")).intValue());
+
+ // Load old generation and verify that new property value is cleared.
+ stm.markAllPropertiesDirty();
+ stm.setId(1);
+ stm.load();
+ assertEquals(0, ((Integer) bean.getPropertyValue(stm, "prop0")).intValue());
}
{
|
