I think you should use the CriteriaBuilder#any(Subquery<Y> subquery) method to construct that expression. Let us know if that works, and if not, please provide a reproducer test case so that we can analyze the issue. You can start from our test case templates. |