First fetch from the backingMap.
This commit is contained in:
parent
265947586c
commit
bf1d5f217f
2 changed files with 11 additions and 8 deletions
2
pom.xml
2
pom.xml
|
@ -5,7 +5,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.helenus</groupId>
|
||||
<artifactId>helenus-net-core</artifactId>
|
||||
<version>2.0.47-SNAPSHOT</version>
|
||||
<version>2.0.48-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>helenus</name>
|
||||
|
|
|
@ -28,8 +28,10 @@ public abstract class AbstractEntityDraft<E> implements Drafted<E> {
|
|||
public E build() { return Helenus.map(getEntityClass(), toMap()); }
|
||||
|
||||
protected <T> 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)) {
|
||||
|
@ -42,6 +44,7 @@ public abstract class AbstractEntityDraft<E> implements Drafted<E> {
|
|||
return (T) type.getDefaultValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue