From: Bill S. (JIRA) <no...@at...> - 2006-06-14 17:00:38
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1837?page=comments#action_23338 ] Bill Schneider commented on HHH-1837: ------------------------------------- This is really a request for documentation. I agree the HQL behavior is correct. The only issue is that, because the implicit-join syntax looks deceptively similar to something you could have in JSTL-EL, the SQL inner-join behavior is not immediately obvious to someone looking at this as a Java developer. So I think it would be helpful to just include a blurb to the effect of the above in the section in the hibernate reference on HQL implicit joins. > discussion: implicit joins are always INNER > ------------------------------------------- > > Key: HHH-1837 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1837 > Project: Hibernate3 > Type: Improvement > Reporter: Bill Schneider > > > It would be helpful to explain the consequences in the docs re. implicit joins always resulting in INNER joins. > This causes semantics of HQL expressions to be quite different from similar-looking JSTL expressions. > in particular consider (copied from comment on HHH-989) this HQL expression > "cat.mate.name= ? OR cat.name=?" > if cat.mate is null, this will not return any results, **even if** the right hand cat.name=? expression matches. > A similar condition in JSTL (<c:if test="${cat.mate.name = ... || cat.name = ...}">) would behave differently. > The HQL behavior may be correct, but sure could be confusing at first. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |