Unit表

id,code

User表

id,ucode

 

...
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="ucode",referencedColumnName="code",unique=true,nullable=false,insertable = false,updatable = false)
public Unit getUnit() {
return this.unit;
}

加粗部分为关键。

相关文章:

  • 2021-11-12
  • 2021-05-20
  • 2022-12-23
  • 2021-10-02
  • 2021-06-15
  • 2021-11-27
  • 2021-08-14
  • 2022-01-01
猜你喜欢
  • 2022-12-23
  • 2018-11-10
  • 2021-04-03
  • 2021-08-16
  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
相关资源
相似解决方案