-->
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: casting resultset problem
PostPosted: Wed Apr 19, 2006 9:57 am 
Newbie

Joined: Sun Apr 16, 2006 3:46 am
Posts: 2
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:
====================
HI,
I WANT TO CAST MY RESULTSET TO A SPECIAL OBJECT,BUT MY RESULTSET LIST IS A SET OF SOME PROPERTIES OF SOME TABLES.IS THERE A GOOD WAY TO CAST MY RESULTSET TO THAT OBJECT.I NEED TO THIS PROCESS MORE THAN ONE TIME.
HELP ME PLEASE.THANKS


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 19, 2006 10:30 am 
Expert
Expert

Joined: Thu Sep 22, 2005 10:29 am
Posts: 285
Location: Almassera/Valencia/Spain/EU/Earth/Solar system/Milky Way/Local Group/Virgo Supercluster
Are you looking for something like this???:
Code:
select
   new Family(
      mother,
      mate,
      offspr
   )
from
   DomesticCat as mother
   join mother.mate as mate
   left join mother.kittens as offspr


from Hibernate reference
14.5. The select clause


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.