Hibernate without Primary Key

前端 未结 5 1437
梦如初夏
梦如初夏 2020-12-03 08:00

I making a sample application with Hibernate. My requirement is that there is no primary key on the table. I had to do only select query from application. I know there shoul

5条回答
  •  余生分开走
    2020-12-03 08:22

    1. Hibernate requires that entity tables have primary keys. End of story.
    2. 50k records is simply not that many when you're talking about a database.

    My advice: add an autoincrement integer PK column to the table. You'll be surprised at how fast it is.

提交回复
热议问题