是many-to-one的映射建错了,映射many-to-one时列名应该是本表中的字段名。
把Addr.hbm.xml的以下内容改一下:
<many-to-one name="customer" class="Customer" column="ID" not-null="true" />
改为
<many-to-one name="customer" class="Customer" column="CUSTOMERID" not-null="true" />
把Addr.hbm.xml的以下内容改一下:
<many-to-one name="customer" class="Customer" column="ID" not-null="true" />
改为
<many-to-one name="customer" class="Customer" column="CUSTOMERID" not-null="true" />
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货