Java Coder
How to create primary key using hibernate?
1 Answer(s)      2 years and a month ago
Posted in : Hibernate

Hi,

How to create primary key using hibernate?

Thanks,

Advertisement
View Answers

May 2, 2013 at 12:03 PM


Hi,

Every relational table has a "natural" primary key. However, it may be unrecognized and undefined. To create primary key using hibernate we need to specify the key generation techniques in hibernate?s XML mapping file.

Here is syntax for Primary key in hibernate

For more visit this link : http://www.roseindia.net/hibernate/

Thanks,