Commit d6f62241 authored by Piotr Gawron's avatar Piotr Gawron

fix of null Doubles added

parent 62a81824
......@@ -406,8 +406,7 @@ public abstract class BaseDao<T> {
if (u.getType() == String.class) {
u.setAccessible(true);
String newObject;
newObject = (String) u.get(t);
String newObject = (String) u.get(t);
Column column = getAnnotationColumn(u);
if (column != null) {
if (!column.nullable()) {
......@@ -420,6 +419,17 @@ public abstract class BaseDao<T> {
u.set(t, newObject.substring(0, column.length() - 1));
}
}
} else if (u.getType() == Double.class) {
u.setAccessible(true);
Object newObject = u.get(t);
Column column = getAnnotationColumn(u);
if (column != null && !column.nullable()) {
if (newObject == null) {
u.set(t, 0.0);
}
}
} else {
logger.error("Don't know how to handle class: " + u.getType());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment