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: Issues about stored procedures and NH
PostPosted: Mon Sep 13, 2010 2:12 pm 
Newbie

Joined: Tue Apr 06, 2010 1:09 pm
Posts: 9
Hello everyone
For some reasons I must use SP with NH(v 2.1.0.1), and I have some issues about this:
1.- In many posts says that I have to re-write the SP in the map file, Is it necesary?
2.- How to return a scalar result? The <return-scalar> looks good but have a column property and my result doesn't had a rowtitle, is rowtitle mandatory for this tag?
3.- How to return a list result? It means, rows from many tables.
3.- I wanna create a Repository only for execute my SPs, is it possible? and one map file?

Greetings
Xavier


Top
 Profile  
 
 Post subject: Re: Issues about stored procedures and NH
PostPosted: Tue Sep 14, 2010 1:46 am 
Newbie

Joined: Mon Sep 13, 2010 2:43 am
Posts: 8
<class name="MenuDetails" >
<id name="moduleID" />
<property name="moduleDesc" />
<property name="messageKey"/>
<property name="messageAction"/>
</class>


<sql-query name="<name tobe refered from app>" callable="true">
<return alias="menuDetails" class="MenuDetails">
<return-property name="moduleID" column="moduletypeid"/>
<return-property name="moduleDesc" column="moduledesc"/>
<return-property name="messageKey" column="messagekey"/>
<return-property name="messageAction" column="actionmapping"/>
</return>
{call ProcedureName(:flag,:operatorID)}
</sql-query>
Try this, Hope It will work.


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.