-->
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.  [ 3 posts ] 
Author Message
 Post subject: Stored procedure with many input parameters
PostPosted: Wed Apr 12, 2006 4:24 am 
Newbie

Joined: Thu Apr 06, 2006 10:16 am
Posts: 6
Hello

Is there a way to map (in hbm files) the fields from a bean as input parameters for a stored procedure? I mean something like how the mapping is done for the returned result set's columns.

I'm asking this because i'm dealing with a stored procedure who has about 40 input parameters and i wish not to set them manually in code as string parameters: query.setParameter("firstName", fName), query.setParameter("lastName", lName).. etc.

Thank you

Daniel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 12, 2006 9:01 am 
Senior
Senior

Joined: Wed Aug 17, 2005 12:56 pm
Posts: 136
Location: Erie, PA (USA)
What about .setProperties(Object bean) method of Query interface? Looks like it does exactly what you are asking for.

Curtis ...


Top
 Profile  
 
 Post subject: Stored procedure with many input parameters
PostPosted: Wed Apr 12, 2006 9:42 am 
Newbie

Joined: Thu Apr 06, 2006 10:16 am
Posts: 6
Hello Curtis

Thanx for the tip, it worked

Daniel


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