diff options
Diffstat (limited to 'src/main/java/com/amazon/carbonado/raw')
-rw-r--r-- | src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java | 11 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/raw/GenericStorableCodec.java | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java b/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java index cba6776..c0fa0af 100644 --- a/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java +++ b/src/main/java/com/amazon/carbonado/raw/GenericEncodingStrategy.java @@ -19,7 +19,9 @@ package com.amazon.carbonado.raw;
import java.lang.reflect.Method;
+import java.util.ArrayList;
import java.util.Arrays;
+import java.util.List;
import java.util.Map;
import org.cojen.classfile.CodeAssembler;
@@ -397,14 +399,15 @@ public class GenericEncodingStrategy<S extends Storable> { Map<String, ? extends StorableProperty<S>> map =
StorableIntrospector.examine(mType).getDataProperties();
- StorableProperty<S>[] properties = new StorableProperty[map.size()];
+ List<StorableProperty<S>> list = new ArrayList<StorableProperty<S>>(map.size());
- int ordinal = 0;
for (StorableProperty<S> property : map.values()) {
- properties[ordinal++] = property;
+ if (!property.isDerived()) {
+ list.add(property);
+ }
}
- return properties;
+ return list.toArray(new StorableProperty[list.size()]);
}
protected StorablePropertyInfo checkSupport(StorableProperty<S> property)
diff --git a/src/main/java/com/amazon/carbonado/raw/GenericStorableCodec.java b/src/main/java/com/amazon/carbonado/raw/GenericStorableCodec.java index 43677f2..2532556 100644 --- a/src/main/java/com/amazon/carbonado/raw/GenericStorableCodec.java +++ b/src/main/java/com/amazon/carbonado/raw/GenericStorableCodec.java @@ -797,7 +797,7 @@ public class GenericStorableCodec<S extends Storable> implements StorableCodec<S StorableIntrospector.examine(altStorable).getAllProperties();
for (StorableProperty prop : currentProps.values()) {
- if (prop.isJoin()) {
+ if (prop.isDerived() || prop.isJoin()) {
continue;
}
|