mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-06 00:32:18 +00:00
#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:
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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user