#817 - SqlRow getBoolean() does not treat numeric 1 value as true (with MySql and other DB's without native boolean type)

This commit is contained in:
Robin Bygrave committed 2016-08-29 20:54:49 +12:00
1 parent d1e2176a5a
commit 59670d0303
3 files changed
+56

No files matched your search

@@ -150,6 +150,9 @@ public final class BasicTypeConverter implements Serializable {
if (value instanceof Boolean) {
return (Boolean) value;
}
if (value instanceof Number) {
return ((Number)value).intValue() == 1;
}
String s = value.toString();
return s.equalsIgnoreCase(dbTrueValue);
}