-->
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.  [ 3 posts ] 
Author Message
 Post subject: How to retrieve data from a View using hibernate
PostPosted: Fri Jun 26, 2009 5:19 am 
Newbie

Joined: Fri May 30, 2008 10:37 am
Posts: 10
Hi All,

I need to retrieve data from a 'View'. Does hibernate support geting data from a View other than using native query?

Regards,
Nalaka


Top
 Profile  
 
 Post subject: Re: How to retrieve data from a View using hibernate
PostPosted: Fri Jun 26, 2009 5:35 am 
Newbie

Joined: Tue Jun 23, 2009 3:31 am
Posts: 10
Create an entity for the view. If the view does not have primary key of the table then pick any one of the column, which u believe that as unique as id.

You can use the entity in HQL or Criteria to query the view.


Top
 Profile  
 
 Post subject: Re: How to retrieve data from a View using hibernate
PostPosted: Fri Jun 26, 2009 6:30 am 
Newbie

Joined: Fri May 30, 2008 10:37 am
Posts: 10
thanks..


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