How do you define sequence generated primary key in hibernate?
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> <a href="http://candidjava.com/hibernate-interview-question"></a>
Hibernate Interview Question
Moderators: pilkguns, m1963, smoking357
-
- Posts: 2
- Joined: Mon Jan 02, 2012 6:31 am
Hibernate Interview Question
Last edited by candidjava on Mon Jan 02, 2012 8:34 am, edited 3 times in total.
-
- Posts: 2
- Joined: Mon Jan 02, 2012 6:31 am
Hibernate Interview Question
More Hibernate Interview Questionhttp://candidjava.com/hibernate-interview-question