Quote:
So, lets take the WHERE clause from the HQL : "WHERE ((o.sale.reference = :reference) OR (o.purchase.localReference = :reference1))"
This means that it should select "o" if one of the conditions is meet(and regardless of what is happening to the other condition), right?
Why, because *you* say so? Based on what? Your gut?
I understand what you are saying from a wishful thinking position, but that has nothing to do with reality, nor how Hibernate has treated this forever, nor what the ejb3 spec actually says on the subject.
Have a look at the Hibernate documentation regarding implicit / explicit joins.
Oh, but that's just vendor interpretation, right? Nope. Go and have a look at the EJB3 spec (section 4.4.4 Path Expressions):
Quote:
Path expression navigability is composed using “inner join” semantics. That is, if the value of a non-terminal
association-field in the path expression is null, the path is considered to have no value, and does
not participate in the determination of the result.