玩转JPA(一)---异常:Repeated column in mapping for entity/should be mapped with insert="false" update="fal
来源:互联网 发布:大闹天宫美人神兵数据 编辑:程序博客网 时间:2024/05/24 01:53
最近用JPA遇到这样一个问题:Repeated column in mapping for entity: com.ketayao.security.entity.main.User column: org_id (should be mapped with insert="false" update="false")
这个错误是由实体类引起的,我一开始是这样写的:
@Column
private long orgId;
@ManyToOne
@JoinColumn(name="orgId")
private Organization organization;
在这里get和set方法就省略了。
修改为下面这样就好:
@Column(insertable=false,updatable=false)
private long orgId;
@ManyToOne
@JoinColumn(name="orgId")
private Organization organization;
0 0
- 玩转JPA(一)---异常:Repeated column in mapping for entity/should be mapped with insert="false" update="fal
- Repeated column in mapping for entity: .... should be mapped with insert="false" update="false"
- Repeated column in mapping for entity:(should be mapped with insert="false" update="false")
- Repeated column in mapping for entity:should be mapped with insert="false" update="false"
- Repeated column in mapping for entity:should be mapped with insert="false" update="false"
- Repeated column in mapping for entity:(should be mapped with insert="false" update="false")
- Repeated column in mapping for entity:(should be mapped with insert="false" update="false")
- Repeated column in mapping for entity: XXpojo column: xx (should be mapped with insert="false" upda
- Repeated column in mapping for entity: cn.cnic.qlms.entity.User column: id (should be mapped with in
- column: xxxxxx_ID (should be mapped with insert="false" update="false")
- hibernate column should be mapped with insert="false" update="false" 错误原因
- JPA-hibernate注解之 should be mapped with insert="false" update="false"
- should be mapped with insert="false" update="false"
- should be mapped with insert="false" update="false"
- should be mapped with insert="false" update="false"
- should be mapped with insert="false" update="false
- (should be mapped with insert="false" update="false")
- should be mapped with insert="false" update="false"
- spark学习十七 spark standaloe模式下资源的神情与释放
- NodeJs+Express4 练习Demo2——我的博客
- SOCKET通信的基本步骤
- HDU 1998 奇数阶魔方
- poj 1679 The Unique MST(图论:最小生成树)
- 玩转JPA(一)---异常:Repeated column in mapping for entity/should be mapped with insert="false" update="fal
- java基础测试(面向对象之前)
- .net的session详解
- 签到应用总结
- java网络编程实例2.1——用阻塞+线程池实现的文件传输客户端
- 2014 Multi-University Training Contest 1--by FZU 解题报告
- 根据屏幕大小自适应字体大小
- 日记之php程序调试
- STM32开发指南笔记(前言)