我在类域微服务中有错误 Oracle 数据库
package hisL3.vnpt.tiepnhan.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import oracle.sql.DATE;
//import org.hibernate.annotations.Table;
import javax.persistence.Table;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Column;
import javax.persistence.Id;
@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "his_manager.tgg_quanly_lichhen")
public class Dm_bao_hiem_y_te {
private Integer id;
private Integer id_lichhen;
private Integer mabenhnhan;
private String tenbenhnhan;
private Integer gioitinh;
private String sodienthoai;
private String tenbenhvien;
private Integer songay;
private DATE ngayhen;
private DATE ngaythaotac;
private Integer ngioithaotac;
private Integer guisms;
@Column(name = "ID_LICHHEN", insertable = false, updatable = false)
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getId_lichhen() {
return id_lichhen;
}
public void setId_lichhen(Integer id_lichhen) {
this.id_lichhen = id_lichhen;
}
public Integer getMabenhnhan() {
return mabenhnhan;
}
public void setMabenhnhan(Integer mabenhnhan) {
this.mabenhnhan = mabenhnhan;
}
public String getTenbenhnhan() {
return tenbenhnhan;
}
public void setTenbenhnhan(String tenbenhnhan) {
this.tenbenhnhan = tenbenhnhan;
}
public Integer getGioitinh() {
return gioitinh;
}
public void setGioitinh(Integer gioitinh) {
this.gioitinh = gioitinh;
}
public String getSodienthoai() {
return sodienthoai;
}
public void setSodienthoai(String sodienthoai) {
this.sodienthoai = sodienthoai;
}
public String getTenbenhvien() {
return tenbenhvien;
}
public void setTenbenhvien(String tenbenhvien) {
this.tenbenhvien = tenbenhvien;
}
public Integer getSongay() {
return songay;
}
public void setSongay(Integer songay) {
this.songay = songay;
}
public DATE getNgayhen() {
return ngayhen;
}
public void setNgayhen(DATE ngayhen) {
this.ngayhen = ngayhen;
}
public DATE getNgaythaotac() {
return ngaythaotac;
}
public void setNgaythaotac(DATE ngaythaotac) {
this.ngaythaotac = ngaythaotac;
}
public Integer getNgioithaotac() {
return ngioithaotac;
}
public void setNgioithaotac(Integer ngioithaotac) {
this.ngioithaotac = ngioithaotac;
}
public Integer getGuisms() {
return guisms;
}
public void setGuisms(Integer guisms) {
this.guisms = guisms;
}
}
Failed to initialize JPA EntityManagerFactory: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.MappingException: Repeated column in mapping for entity: hisL3.vnpt.tiepnhan.entity.Dm_bao_hiem_y_te column: id_lichhen (should be mapped with insert="false" update="false")
答案 0 :(得分:0)
连接 oracle.jdbc.driver.T4CConnection@493325b4 由于 SQLSTATE(08006), ErrorCode(17002) 标记为损坏