Hibernate: Perform criteria query with Sub-Select AND Left-Outer join?

Posted by Markos Fragkakis on Stack Overflow See other posts from Stack Overflow or by Markos Fragkakis
Published on 2010-04-16T16:54:22Z Indexed on 2010/04/16 19:13 UTC
Read the original article Hit count: 731

Filed under:
|
|
|
|

Can I perform a Criteria query with Sub-Select AND Left-Outer join?

For example, I have A 1-many B 1-many C.

With Criteria.createAlias ("b", "b", Criteria.LEFT_JOIN) I can perform Left Outer join.

With Criteria.setFetchMode ("b", org.hibernate.FetchMode.DEFAULT) I can perform Join with the default fetching strategy. I assume that having set @org.hibernate.annotations.FetchMode.SUBSELECT in both A.B and B.C is enough (is it?).

Question 1: Why does org.hibernate.FetchMode not have SUBSELECT option, whereas the org.hibernate.annotations.FetchMode does?

Question 2: Can I perform a Criteria query with Sub-Select AND Left-Outer join?

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about java