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: How will i retrived multiple objects?
PostPosted: Tue May 15, 2007 2:41 am 
Newbie

Joined: Mon May 07, 2007 1:55 am
Posts: 1
How will i got mulitple object while running as shown query below
Code:
select  c.deptname,m.id,m.name  from Child as c,Master as m where m.id=c.id



As above mentioned two object i.e., Child and master .So,how will i got particular object property value and how will i differnate with multiple objects.Please help


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 15, 2007 5:12 am 
Senior
Senior

Joined: Sat Apr 21, 2007 11:01 pm
Posts: 144
I don't understand. Your select will select into a List/Set of objects (VOs, POJOs, w/e) that takes (probably) (String, int, String) for it's constructor. Then you can access those feilds with access methods...
If you wan't to select one specific object or narrow your search then add clauses to your WHERE.

Hope that helps. HQL docs: http://www.hibernate.org/hib_docs/refer ... ryhql.html

_________________
Everytime you get an answer to your question without giving credit; god kills a kitten. :(


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.