-->
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.  [ 1 post ] 
Author Message
 Post subject: Query.list() returns nested lists. Is this a bug?
PostPosted: Tue Oct 18, 2005 10:37 pm 
Newbie

Joined: Wed Oct 05, 2005 8:22 pm
Posts: 11
Location: Brisbane, Australia
This rather complicated query returns a list of 1 which contains a list of 1.

My question is, is that what we are asking for in the HQL or is it a bug? I didn't think Hibernate returned nested lists.

Code:
from Employment emp join emp.employmentSubstantiveRanks esr where
emp.personnel.id = :PERSONNEL_ID and emp.fromDate =
(select max(e.fromDate) from Employment e where e.personnel.id = :PERSONNEL_ID and ((e.toDate > :SYSDATE or (e.toDate is null))) and
esr.comp_id.fromDate = (select max(esr1.comp_id.fromDate)
from EmploymentSubstantiveRank esr1 join esr1.employment e1
where e1.personnel.id = :PERSONNEL_ID and e1.fromDate = (select max(e2.fromDate) from Employment e2 where e2.personnel.id = :PERSONNEL_ID and
((e2.toDate > :SYSDATE) or (e2.toDate is null))) and ((esr1.toDate > :SYSDATE) or (esr1.toDate is null)))



Thanks,
Christian Catchpole

_________________
Atomic Objects
http://atomic.catchpole.net/

An object environment in which Java objects can be created, linked and taught to relate to one another.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.