mirror of https://github.com/apache/openjpa.git
Workaround for HSQL bug in treating Long.MAX_VALUE as a double.
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@446720 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b2e0133907
commit
65e0a48a81
|
@ -214,6 +214,18 @@ public class HSQLDictionary
|
||||||
return cols;
|
return cols;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setDouble(PreparedStatement stmnt, int idx, double val,
|
||||||
|
Column col)
|
||||||
|
throws SQLException {
|
||||||
|
// HSQL has a bug where it cannot store a double if it is
|
||||||
|
// exactly the same as Long.MAX_VALUE or MIN_VALUE
|
||||||
|
if (val == Long.MAX_VALUE || val == Long.MIN_VALUE) {
|
||||||
|
stmnt.setLong(idx, (long)val);
|
||||||
|
} else {
|
||||||
|
super.setDouble(stmnt, idx, val, col);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setBigDecimal(PreparedStatement stmnt, int idx, BigDecimal val,
|
public void setBigDecimal(PreparedStatement stmnt, int idx, BigDecimal val,
|
||||||
Column col)
|
Column col)
|
||||||
throws SQLException {
|
throws SQLException {
|
||||||
|
|
Loading…
Reference in New Issue