-->
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: Stored procedure
PostPosted: Tue May 16, 2006 3:28 pm 
Newbie

Joined: Mon May 15, 2006 3:10 pm
Posts: 3
I have a named query that runs a stored procedure...

<sql-query name="defaultQuickLinks" callable="true">
<return alias="defaultQuickLinks" entity-name="Links">
</return>
{call BUP_APP_GetDefaultQuicklinks(:a, :b, :c)}
</sql-query>


The procedure returns a resultset

my question is can i map this to an object in hibernate that does not have a database table.

the data from the stored proc is from different sources, so im not clear on how to map it to an entity/class

is is possible to create a mapping in hibernate to an object that has no db table???

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 16, 2006 4:54 pm 
Regular
Regular

Joined: Wed Aug 25, 2004 6:23 am
Posts: 91
Yes - you can use that named query that you've already defined. See here in the docs for details.

Hope that helps.
Cheers,
Rich.


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.