-->
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: hql returns System.Object[]
PostPosted: Thu Oct 11, 2007 5:51 am 
Newbie

Joined: Thu Oct 11, 2007 5:40 am
Posts: 8
I am using the following hql statement to retrieve a list of BreedingProject objects:

string hql =
@"from BreedingProject as bp left join bp._crops cs
where bp._year = :requestYear and
(cs in (:cropList) or cs is null) ";

But instead of a list of BreedinProject objects it returns a list of System.Object[] objects with a BreedingProject object at index 0 and a Crop (=cs) object at index 1.
I more or less do understand that this is caused by the left join call, but what hql should I use in order to obtain a list of BreedingObjects instead, against the same where clause?


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.