hibernate 的入门例子,但报错 Repeated column in mapping for entity,各位帮看看。
hibernate 的入门例子,但报错 Repeated column in mapping for entity
<hibernate-mapping package="com.entity">
<class name="Student" table="t_student">
<id name="sid" column="sid">
<generator class="increment"/>
</id>
<property name="name" column="name"></property>
<property name="addr" column="addr"/>
<property name="age" column="age"/>
<many-to-one name="card" column="cid" class="com.entity.Card" unique="true" cascade="all" />
</class>
</hibernate-mapping>
报错
Exception in thread "main" org.hibernate.MappingException: Repeated column in mapping for entity: com.entity.Card column: cid (should be mapped with insert="false" update="false")
我没有重复映射cid呀,各位帮看看。