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?
|