I am using Hibernate 3 .
Hi ,
I am attending a session on Hibernate . I was confused about one of the discussion he had when working with Hibernate and Primary key in Tables under Database .
What he mentioned is that ,When working with Hibernate , its not compulsary for a Database column to have a primary key , but its mandatory to mention a Primary Key hbm file representing that Table .
Please let me know if this is true ??
Thanks in advance .
Hibernate needs a unique, immutable ID for each entity. Whereas this ID is declared as primary key or not in the database table mapped by this entity doesn’t matter. But I don’t see what you would gain by not declaring it as a primary key.