openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <reeder...@gmail.com>
Subject Re: Call Stored Procedures hibernate annotations
Date Sat, 29 Nov 2008 18:43:00 GMT
Is there some reason you can't do it with a JPA native Query called with executeUpdate?

Doug Reeder
sent from my Palm OS Treo 650

-----Original Message-----

From:  piltrafeta <piltrafeta@gmail.com>
Subj:  Call Stored Procedures hibernate annotations
Date:  Fri Nov 28, 2008 10:18 am
Size:  585 bytes
To:  users@openjpa.apache.org


I'm using hibernate annotations and i'd like to use a stored procedure which
returns a resultset.
I kow to do it whit hbm files but i'd like directly by createSQLQuery.

Maybe something like this is possible:
List list = session.createSQLQuery("call
PK_TRUCK_APPOINT_ORDER.FN_TRABA_CHKCTR_resulset(?,?)")
   .setParameter(0, container) 
   .setParameter(1, user) 
   .list();

Thanks in advance!



Mime
View raw message