java - calling stored procedure by hibernate -


i'm writing java web-based application stores data in microsoft sql server 2008 , connect database hibernate.

i have 3 tables , 3 classes same them in source code, named form, users , pckgform. want call stored procedure database in 1 of controller classes of program. stored procedure bellow, returns columns of 3 tables:

create procedure [dbo].[usersentform] @userid varchar(50) begin select *  mobile.dbo.users us, mobile.dbo.pckgform pf,  mobile.dbo.form f  us.userid=@userid , us.userid=pf.userid , pf.frmid=f.frmid end 

in hibernate.hbm.xml file, in sql-query tag of mentioned stored procedure write this:

return alias="sentform" class="domain.form" 

but values returned data mapped class domain.form , in source code can use "form" class, while want use parameters "users" class , "pckgform" class.

any suggestions?


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -