summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/layout
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/amazon/carbonado/layout')
-rw-r--r--src/main/java/com/amazon/carbonado/layout/LayoutProperty.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/layout/LayoutProperty.java b/src/main/java/com/amazon/carbonado/layout/LayoutProperty.java
index a0ce48f..bf35073 100644
--- a/src/main/java/com/amazon/carbonado/layout/LayoutProperty.java
+++ b/src/main/java/com/amazon/carbonado/layout/LayoutProperty.java
@@ -20,6 +20,7 @@ package com.amazon.carbonado.layout;
import org.cojen.classfile.TypeDesc;
+import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.PersistException;
import com.amazon.carbonado.SupportException;
@@ -187,6 +188,13 @@ public class LayoutProperty {
void store() throws PersistException {
if (!mStoredLayoutProperty.tryInsert()) {
+ StoredLayoutProperty existing = mStoredLayoutProperty.copy();
+ try {
+ existing.load();
+ existing.copyVersionProperty(mStoredLayoutProperty);
+ } catch (FetchException e) {
+ throw e.toPersistException();
+ }
mStoredLayoutProperty.update();
}
}