Does it require to have a primary key column in tables to use hibernate. I have read the article which says that it is required to have primary key column in your tables so that hibernate can identifu each record uniquely.
I am trying to insert a data into following table design
Code:
UserHead
------------
User_Id Varchar(6) PK
Password Varchar(8) Not Null
User_Name Varchar(20) Not Null
UserDetails
--------------
User_Id Varchar(6) References UserHead(User_Id) Not Null
Role_Id Varchar(3) Not Null
For above schema design how can we use hibernate. Any example source code provided will be appreciated.
Thanks in advance.