Hi, I'm using Hibernate 3.0.
This question may be a bit elementary but I have the following query, in which instances of a product (referred to as a 'type') are fetched along with keywords describing it :
Code:
select i from Instance as i left outer join fetch i.keywords as keywords join fetch i.type where i.status <> :status and i.user.id =:uid
My expectation was to get a list of POJOs made up of com.acme.Instance and have the keywords fall under getKeywords().
Perhaps I've misunderstood something gravely, but if I enter a single instance with 3 keywords, calling list() upon the query above (after all parameters have been set) returns a list of 3 Instance POJOs (each with the appropriate keywords) rather than a single Instance POJO with a list of 3 keywords in the getKeywords() property. Is there any way to get Hibernate to return a single object instead?