Steve Ebersole commented on Bug HHH-2049

First, this was never a bug fix. It was a change in behavior. I think we need to be straight about that.

Secondly, yes and no, in terms of "that's what Gails patch does, isn't it?". Yes, that is the end result for your case. However, how it does that causes other problems. Really, Gail was just working within the existing limitation. The problem is that a real fix here needs to address that limitation. Partially this gets into a larger discussion we have been having within the development team now for quite some time in terms of coalescing this SQL generation stuff into a single approach. That is obviously a bit ambitious for this. However, within the existing split it should still be possible to make this differentiation in Criteria queries between:

  • should an association be part of the SQL join tree (joining), and
  • should an association be part of the SQL select tree (fetching)

That is mostly what I am looking at. However, I still contend that your model and use-case are simply incorrect. You have requested join fetching explicitly (in the mapping, and Criteria is well documented to honor that). You then place restrictions on that fetched association. That logically should result in a filtered collection. I am sorry you do not see it that way. But as others have commented here there are very real use cases for that. And with this change they have no possible way to achieve their expected behavior.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: