should be mapped with insert="false" update="false"
2012-05-04 17:17
429 查看
<property name="ab" type="java.lang.String"></property>
<many-to-one name="nation" class="entity.Nation" column="ab"></many-to-one>
可以看到column对应ab出现了两次,把最上面的那个property去掉即可,因为同一个列不能映射2次。这样做有一个问题就是,通过操作这个对象的时候,这个ab属性会消失。
或者改下面<many-to-one name="nation" class="entity.Nation" column="ab" insert="false" update="false"></many-to-one>,推荐这个
<many-to-one name="nation" class="entity.Nation" column="ab"></many-to-one>
可以看到column对应ab出现了两次,把最上面的那个property去掉即可,因为同一个列不能映射2次。这样做有一个问题就是,通过操作这个对象的时候,这个ab属性会消失。
或者改下面<many-to-one name="nation" class="entity.Nation" column="ab" insert="false" update="false"></many-to-one>,推荐这个
相关文章推荐
- 出现should be mapped with insert="false" update="false"的解决方法
- should be mapped with insert="false" update="false
- JPA-hibernate注解之 should be mapped with insert="false" update="false"
- Repeated column in mapping for entity:(should be mapped with insert="false" update="false")
- 玩转JPA(一)---异常:Repeated column in mapping for entity/should be mapped with insert="false" update="fal
- should be mapped with insert="false" update="false"的解决方法 和对象产生默认值的解决方法
- Repeated column in mapping for entity:should be mapped with insert="false" update="false"
- msg_cp (should be mapped with insert="false" update="false")
- should be mapped with insert="false" update="false"
- column: xxxxxx_ID (should be mapped with insert="false" update="false")
- hibernate column should be mapped with insert="false" update="false" 错误原因
- Hibernate_should be mapped with insert="false" update="false"的解决方法
- Repeated column in mapping for entity:(should be mapped with insert="false" update="false")
- 玩转JPA(一)---异常:Repeated column in mapping for entity/should be mapped with insert="false" update="fal
- Hibernate中should be mapped with insert="false" update="false"错误
- 出现should be mapped with insert="false" update="false"的解决方法
- hibernate配置文件中重复定义导致的错误:should be mapped with insert="false" update="false"
- Repeated column in mapping for entity: .... should be mapped with insert="false" update="false"
- should be mapped with insert="false" update="false"
- hibernate异常-should be mapped with insert="false" update="false"