summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2007-05-05 16:22:52 +0000
committerBrian S. O'Neill <bronee@gmail.com>2007-05-05 16:22:52 +0000
commit2d5fb771996cb79963b7d763b9148e6f1c1c98cb (patch)
tree9fc60f63ac258e33f709a13f3bfa94b966ad236c
parent36b04022536c54c405fd217ad04773a1ad3fcf20 (diff)
Mark join properties as transient.
-rw-r--r--src/main/java/com/amazon/carbonado/gen/StorableGenerator.java8
1 files changed, 6 insertions, 2 deletions
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<S extends Storable> {
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) {