that's the response what i thought my subject would attract
.... a possible interview question. I am sorry for that as i typed the question in a hurry.
Well honestly it is not. I was going through this official hibernate
Tutorial which said
There is one caveat: Never use the database identifier to implement equality, use a business key, a combination of unique, usually immutable, attributes. The database identifier will change if a transient object is made persistent.
Generally, i use a tool that reverse engineers from a database table to create corresponding hibernate classes. That tool simply uses the table primary key and maps it to the <id> element.
Does database identifier mean "primary key"?
If yes then how does the database identifier change if i am not modifying it?
What am i missing here?
I know it might be a silly question but i would appreciate any help.