Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Elliott Jones   on Jul 08 In Java Category.

  
Question Answered By: Norman Ray   on Jul 08

when you generate your hbm file ,your auto  generated primary  key is like this:


<id name="id" type="long">
<column name="ID" />
<generator class="native" />
</id>

then you only need set your value object without setting id and persist it .

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Auto generated primary key in hibernate? Or get search suggestion and latest updates.


Tagged: