diff --git a/pom.xml b/pom.xml
index e3ad62a..0362552 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
4.0.0
net.helenus
helenus-net-core
- 2.0.47-SNAPSHOT
+ 2.0.48-SNAPSHOT
jar
helenus
diff --git a/src/main/java/net/helenus/core/AbstractEntityDraft.java b/src/main/java/net/helenus/core/AbstractEntityDraft.java
index adf5cf7..7054739 100644
--- a/src/main/java/net/helenus/core/AbstractEntityDraft.java
+++ b/src/main/java/net/helenus/core/AbstractEntityDraft.java
@@ -28,18 +28,21 @@ public abstract class AbstractEntityDraft implements Drafted {
public E build() { return Helenus.map(getEntityClass(), toMap()); }
protected T get(String key, Class> returnType) {
- T value = (T) entityMap.get(key);
+ T value = (T) backingMap.get(key);
if (value == null) {
+ value = (T) entityMap.get(key);
+ if (value == null) {
- if (Primitives.allPrimitiveTypes().contains(returnType)) {
+ if (Primitives.allPrimitiveTypes().contains(returnType)) {
- DefaultPrimitiveTypes type = DefaultPrimitiveTypes.lookup(returnType);
- if (type == null) {
- throw new RuntimeException("unknown primitive type " + returnType);
+ DefaultPrimitiveTypes type = DefaultPrimitiveTypes.lookup(returnType);
+ if (type == null) {
+ throw new RuntimeException("unknown primitive type " + returnType);
+ }
+
+ return (T) type.getDefaultValue();
}
-
- return (T) type.getDefaultValue();
}
}