-->
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.  [ 7 posts ] 
Author Message
 Post subject: Stored procedure for inserts [succes]
PostPosted: Thu Dec 01, 2005 9:25 am 
Senior
Senior

Joined: Thu Aug 25, 2005 3:35 am
Posts: 160
In large projects, sometimes dynamic sql is not acceptable. The DBA-people or the security policy forbids it. If I understand correctly, Hibernate 3.0 does offer the use of stored procedures, but it might take some time before official support arrives.

Still, dynamic sql for selects might be allowed. In that case nHibernate might still be an option.
In fact, I do believe that for the acceptance of nHibernate on bigger projects, the use of stored procs of updating, deleting and inserting is of the utmost importance.

I have read quite a few questions about this issue.

Here http://nhibernate.sourceforge.net/forum/viewtopic.php?t=322&start=0&postdays=0&postorder=asc&highlight=stored+procedure member 'mnowosad' posts that he has succesfully implemented calls to stored procedures. I have followed the route he describes and can also report succes.

If there are people that need the code, I'd be happy to share. It's not clean code and I have hardcoded the OracleParameters-type. Also, I'm not quite sure if I used the most optimal route. However, feel free to email me at: r.boeke [at] sitechno . com if you are interested in the solution.
Also, if you yourself have code that accomplishes the same, I'd be very interested in it. :P


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 01, 2005 10:23 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
FYI the way it is done in Hibernate3 is basically the same as the solution described in your link - it is just now built into the default persisters so you can override all sql with custom sql or stored procedure calls.

But for some of the more fancier usages of custom sql and stored procedure the design of Hibernate2 and NHibernate makes it hard to generalize - this is why we did not get it before Hibernate3.

/max
(implementor of stored procedure support in H3)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 02, 2005 4:39 am 
Senior
Senior

Joined: Thu Aug 25, 2005 3:35 am
Posts: 160
care to repeat it for the next nhibernate build ?? ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 02, 2005 8:38 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
well when nhibernate start using H3-like internal it should be trivial ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 05, 2005 4:23 am 
Senior
Senior

Joined: Thu Aug 25, 2005 3:35 am
Posts: 160
:D let's hope that will happen soon then. I think it's of the utmost importance for acceptance on big projects


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 05, 2006 12:01 pm 
Newbie

Joined: Thu Jan 05, 2006 11:52 am
Posts: 11
Good news - it looks like stored proc support for NHibernate is coming soon - version 1.1!

http://blog.hibernate.org/cgi-bin/blosx ... /29#future

Cheers,
-Mat


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 05, 2006 2:48 pm 
Senior
Senior

Joined: Thu Aug 25, 2005 3:35 am
Posts: 160
yep, the future is looking very bright indeed!


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