-->
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.  [ 4 posts ] 
Author Message
 Post subject: Question regarding stored proc returning a joined resultset
PostPosted: Mon Dec 17, 2007 2:45 am 
Newbie

Joined: Mon Dec 03, 2007 3:40 am
Posts: 5
Hi,

I was wondering which method you guys use when forced to use a stored proc returning a result set joining several tables? If I have understood correctly there is no way to do this - Hibernate can't map the joined columns in the result set to the correct entities?

Do you map these with normal Hibernate means to an 'entity' that you then parse to represent the real entitities? Or do you simply use jdbc and omit Hibernate alltogether? Or use something else like iBatis?

Thanks,

Kari


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 17, 2007 4:34 am 
Regular
Regular

Joined: Sat Nov 25, 2006 11:37 am
Posts: 72
I believe if you are using JPA you can specify a result set mapping on a native query telling the persistence provider how to map result columns into entities.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 17, 2007 4:55 am 
Newbie

Joined: Mon Dec 03, 2007 3:40 am
Posts: 5
I thought that JPA has no support for stored procs? Could you elaborate? Thanks again!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 17, 2007 5:06 am 
Regular
Regular

Joined: Sat Nov 25, 2006 11:37 am
Posts: 72
I was under the impression that JPA can invoke any native SQL using EntityManager.createNativeQuery(...).


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