I am working on Mvc architecture,I have pojo object i want change primary key please can you help me Primary key is varchar Ex:
Users users=usersDao.load("mark")
You should never change the value of the primary key. The primary key defines the identity of the object. Hibernate or any other JPA implementation cannot identify the object as the same object if the primary key has been changed. If the primary key is subject to change, you should either choose another primary key or generate a surrogate key.
The workaround is to
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With