-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: how to get database generated id back to application
PostPosted: Thu Sep 23, 2004 12:00 pm 
Newbie

Joined: Thu Sep 23, 2004 11:53 am
Posts: 2
I used database trigger to generate table's primiary key.

When I create a POJO and use hibernate to save it, how do I get the database generated ID?

Thanks

flyingsun


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 23, 2004 1:45 pm 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
session.refresh(obj);

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 23, 2004 3:33 pm 
Newbie

Joined: Tue Sep 14, 2004 10:57 am
Posts: 12
Awesome!!! Thank you

-Jay


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 23, 2004 4:42 pm 
Beginner
Beginner

Joined: Wed Oct 01, 2003 3:57 am
Posts: 33
Location: Alpharetta, Georgia
http://www.hibernate.org/hib_docs/api/n ... ang.Object)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.