一、Hibernate的实体类的映射文件中,对于属性precision 、 scale的理解:
<property name="surplusage" type="java.lang.Double"> <column name="m_surplusage" scale="4" /> </property>
NUMBER数据类型可以有两个限定符,如:
column NUMBER ( precision, scale)
precision表示数字中的有效位。如果没有指定precision的话,Oracle将使用38作为精度。
scale表示数字小数点右边的位数,scale默认设置为0. 如果把scale设成负数,Oracle将把该数字取舍到小数点左边的指定位数。