summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/synthetic
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/amazon/carbonado/synthetic')
-rw-r--r--src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableBuilder.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableBuilder.java b/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableBuilder.java
index 98b7dad..2a58f93 100644
--- a/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableBuilder.java
+++ b/src/main/java/com/amazon/carbonado/synthetic/SyntheticStorableBuilder.java
@@ -34,6 +34,7 @@ import com.amazon.carbonado.AlternateKeys;
import com.amazon.carbonado.Index;
import com.amazon.carbonado.Indexes;
import com.amazon.carbonado.Key;
+import com.amazon.carbonado.Name;
import com.amazon.carbonado.Nullable;
import com.amazon.carbonado.PrimaryKey;
import com.amazon.carbonado.Storable;
@@ -455,6 +456,13 @@ public class SyntheticStorableBuilder
property.getReadMethodName(),
propertyType,
null);
+
+ if (property.getName() != null) {
+ // Define @Name
+ Annotation ann = mi.addRuntimeVisibleAnnotation(TypeDesc.forClass(Name.class));
+ ann.putMemberValue("value", property.getName());
+ }
+
if (property.isNullable()) {
mi.addRuntimeVisibleAnnotation(TypeDesc.forClass(Nullable.class));
}