diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/iciql/TableDefinition.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/com/iciql/TableDefinition.java b/src/main/java/com/iciql/TableDefinition.java index 7857a5a..db67fc3 100644 --- a/src/main/java/com/iciql/TableDefinition.java +++ b/src/main/java/com/iciql/TableDefinition.java @@ -152,6 +152,12 @@ public class TableDefinition<T> { } else {
o = Utils.convert(o, targetType);
}
+
+ if (targetType.isPrimitive() && o == null) {
+ // do not attempt to set a primitive to null
+ return;
+ }
+
field.set(obj, o);
} catch (IciqlException e) {
throw e;
|