Hibernate - update the primary key 'id' column in the table

前端 未结 6 1426
猫巷女王i
猫巷女王i 2021-01-18 06:35

In my Java applicaion, I am using hibernate .hbm file to access database; Is this possible to update the primary key \'id\' column in the table; Where the \'id\' column in m

6条回答
  •  自闭症患者
    2021-01-18 07:02

    No. Hibernate doesn't allow to change the primary key. In general, a primary key value should never change, if needs to be changed than the primary key column(s) are not good candidate(s) for a primary key.

提交回复
热议问题