Hibernate/persistence without @Id

后端 未结 9 854
梦谈多话
梦谈多话 2020-11-28 09:07

I have a database view that yields a result set that has no true primary key. I want to use Hibernate/Persistence to map this result set onto Java objects. Of course, becaus

9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-28 09:46

    You could check if there is logic wise an id and provide mapping information accordingly. Hibernate will not check the database for existence of a defined primary key.

提交回复
热议问题