mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +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:
@@ -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