JAVABEAN:
private Integer purchaseCycle; private Long amountPerMonth;SQLMAP:
<result property="purchaseCycle" column="PURCHASE_CYCLE" jdbcType="int" javaType="java.lang.Integer"/>
<result property="amountPerMonth" column="AMOUNT_PER_MONTH" jdbcType="BIGINT" javaType="java.lang.Long"/>
当purchaseCycle, amountPerMonth插入时数据库保存的是null,但查询出来自动就给Javabean赋值了0。
问题是属性的是Integer,Long对象。
我要区分null和0。
知道原因么?
private Integer purchaseCycle; private Long amountPerMonth;SQLMAP:
<result property="purchaseCycle" column="PURCHASE_CYCLE" jdbcType="int" javaType="java.lang.Integer"/>
<result property="amountPerMonth" column="AMOUNT_PER_MONTH" jdbcType="BIGINT" javaType="java.lang.Long"/>
当purchaseCycle, amountPerMonth插入时数据库保存的是null,但查询出来自动就给Javabean赋值了0。
问题是属性的是Integer,Long对象。
我要区分null和0。
知道原因么?
<result property="amountPerMonth" column="AMOUNT_PER_MONTH"/>