-->
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 retun the ID of the recent saved object?
PostPosted: Mon Nov 14, 2005 3:54 pm 
Newbie

Joined: Wed Nov 02, 2005 9:52 am
Posts: 18
Location: Argentina
Hi forum! :lol:
Im working in ASP.NET and SQL server 2000

The question:
I do an sess.save(object) and i want recover the recent saved object's ID, thus redirect user to a page telling "you save this data ..." and retrieve the data by the ID parameter and the name_of_class parameter.

Is this posible with NH? (assuming Yes)
How?

Tks
Antares


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 14, 2005 5:40 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
The new object id is returned by Save. And it's also of course stored in the object itself, unless you are using objects without id properties.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 15, 2005 9:11 am 
Newbie

Joined: Wed Nov 02, 2005 9:52 am
Posts: 18
Location: Argentina
Thanks!
Is that in the NH Docs that come whith NH source?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 17, 2005 11:22 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
No, it is in the description of ISession.Save().

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


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.