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.  [ 1 post ] 
Author Message
 Post subject: Nhibernate Instead Of Trigger and Scope_Identity()
PostPosted: Tue Jun 17, 2008 10:00 am 
Newbie

Joined: Tue Jun 12, 2007 2:43 am
Posts: 4
Hi all,
In my application I have a business entity mapped to a database view.
The database is sql server express edition and the view has one instead of trigger for insert associated to it.
Because the type of generator is Identity there is a problem with the value returned from the "Select Scope_Identity()" query execution. The value is null, probably because the context inside the trigger is different from the context of the nhibernate query.
How Can I solve this problem? Is possible to define a custom slq-insert with output param and use it for set the entity's ID ?


Thanks


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

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.