hibernate3.2与hibernate3.1兼容性问题

聚合函数的查询变了,有可能导致类型转换异常。如果写了聚合代码注意返回类型就可以了。

• COUNT returns Long.
• MAX, MIN return the type of the state-field to which they are applied.
• AVG returns Double.
• SUM returns Long when applied to state-fields of integral types (other than BigInteger); Double
when applied to state-fields of floating point types; BigInteger when applied to state-fields
of type BigInteger; and BigDecimal when applied to state-fields of type BigDecimal.

你可能感兴趣的:(hibernate3)