EntityNotFoundException in Hibernate Many To One mapping however data exist

前端 未结 9 1473
庸人自扰
庸人自扰 2020-12-13 12:39

I am getting javax.persistence.EntityNotFoundException error when I am trying to get User through Invoice object

invoice.getUser().getId()

Error is as follo

9条回答
  •  失恋的感觉
    2020-12-13 13:00

    It should work when you add referencedColumnName = COLUMN in @JoinColumns of @ManyToOne annotation

提交回复
热议问题