Hibernate Criteria API equivalent to HQL select clause?

Posted by Visus Zhao on Stack Overflow See other posts from Stack Overflow or by Visus Zhao
Published on 2010-05-10T10:01:31Z Indexed on 2010/05/10 10:04 UTC
Read the original article Hit count: 364

Filed under:
|
|
|

I'd like to have a combined query for two persistent classes.

In HQL this could be achieved by the select clause,

select new Family(mother, mate, offspr)
    from DomesticCat as mother
        join mother.mate as mate
        left join mother.kittens as offspr

In the above example, Family is a conbined class with DemesticCat as its construtor params

What is the Criteria equivalent of the HQL select clause ?

© Stack Overflow or respective owner

Related posts about java

Related posts about hibernate