-->
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.  [ 2 posts ] 
Author Message
 Post subject: How to get the last insert value of an identity column
PostPosted: Fri May 27, 2005 3:07 am 
Newbie

Joined: Thu Jan 29, 2004 3:19 am
Posts: 3
I have a class named "order" and I successfully insert a new row. The class has two fields :

orderid : int identity
ordername: varchar

I want to have a method returns me the last insert value of orderid.

How is this possible?

Regards,
Kostas


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 27, 2005 11:11 pm 
Newbie

Joined: Sat Apr 02, 2005 2:36 pm
Posts: 4
Location: Philadelphia
after you call session.save() call order.getOrderid()


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.