| This is expected and is actually the reason why the {{ON}}clause is disallowed for fetch joins. Changing the elements of a collection through a filter condition changes the persistent state that Hibernate observes, so this kind of query might even lead to elements being deleted. You should never use a filter condition on a join alias of a fetch joined collection or singular attribute reached through a fetch join of a collection. You should use a custom projection without join fetching instead.
|