Hi Eliazar & Dionis,
I've faced the same issue. But my observation is something like this. When you write {quote} criteria.setFetchMode("prop", FetchMode.JOIN) {quote} it makes left outer join on that prop. When you write {quote} criteria.createAlias("prop", "prop") {quote} it makes inner join on that prop, as per this doc: http://docs.jboss.org/hibernate/envers/3.6/javadocs/org/hibernate/Criteria.html#createAlias%28java.lang.String,%20java.lang.String%29
So using both at the same time obviously doesn't make sense. If you want to make left outer join with alias, you can do the following: {quote} criteria.createAlias("prop", "prop", Criteria.LEFT_JOIN) {quote} I may be wrong but this solves my problem.
|