我使用CaveatEmptor了自定义的用户类型,参考了hibernate in action<英文版>的MonetaryAmount类型。对于Bid的属性amount的映射
<property name="amount"
update="false"
type="auction.persistence.MonetaryAmountCompositeUserType">
<column name="BID_AMOUNT" length="2" not-null="true"/>
<column name="BID_AMOUNT_CURRENCY" length="3" not-null="true"/>
</property>
我表Bid的属性列也有BID_AMOUNT(numeric),BID_AMOUNT_CURRENCY(varchar),但是我运行的时候报BID_AMOUNT列无效的错误,如果我吧BID_AMOUNT改为AMOUNT,为什么这个就好了,报BID_AMOUNT_CURRENCY无效的问题。请问这个是什么原因,我该怎么做?请高手指点
<property name="amount"
update="false"
type="auction.persistence.MonetaryAmountCompositeUserType">
<column name="BID_AMOUNT" length="2" not-null="true"/>
<column name="BID_AMOUNT_CURRENCY" length="3" not-null="true"/>
</property>
我表Bid的属性列也有BID_AMOUNT(numeric),BID_AMOUNT_CURRENCY(varchar),但是我运行的时候报BID_AMOUNT列无效的错误,如果我吧BID_AMOUNT改为AMOUNT,为什么这个就好了,报BID_AMOUNT_CURRENCY无效的问题。请问这个是什么原因,我该怎么做?请高手指点
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货