<generator class=”increment”/>
<id name="productId" type="java.lang.Integer"> <column name="productId"/> <generator class="increment" /> </id>
<many-to-one name="category" class="com.ects.entity.Category" fetch="select"> <column name="CATEGORYID" /> </many-to-one>
存了category就不要写categoryId,会产生 Column 'categoryId' specified twice 的错误 抓狂了