From 2d5fb771996cb79963b7d763b9148e6f1c1c98cb Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Sat, 5 May 2007 16:22:52 +0000 Subject: Mark join properties as transient. --- src/main/java/com/amazon/carbonado/gen/StorableGenerator.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java b/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java index be23563..0fa8708 100644 --- a/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java +++ b/src/main/java/com/amazon/carbonado/gen/StorableGenerator.java @@ -580,8 +580,12 @@ public final class StorableGenerator { if (!property.isDerived()) { if (property.isJoin()) { // If generating wrapper, property access is not guarded by - // synchronization. Mark as volatile instead. - mClassFile.addField(Modifiers.PRIVATE.toVolatile(mGenMode == GEN_WRAPPED), + // synchronization. Mark as volatile instead. Also mark as + // transient since join properties can be reconstructed from + // the other fields. + mClassFile.addField(Modifiers.PRIVATE + .toVolatile(mGenMode == GEN_WRAPPED) + .toTransient(true), name, type); requireStateField = true; } else if (mGenMode == GEN_ABSTRACT) { -- cgit v1.2.3