Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Hibernate%20Interview%20Questions%20and%20Answers

Question: How do you define sequence generated primary key in hibernate?
Answer: Using <generator> tag.
Example:-
<id column="USER_ID" name="id" type="java.lang.Long">
<generator class="sequence">
<param name="table">SEQUENCE_NAME</param>
<generator>
</id>
Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook