Join clause in Criteria API left out with versions 6.5.0.Final and above

Thank You very much for detailed analysis. I also came to an idea of subselect, but was reluctant to go into it. I am just wondering isn’t our problem very similar to the one discussed here: Selection with criteria and entity graph updates data - #8 by Steven_Mahieu

Specifically, last sentence in this thread states

That’s why @beikov confirmed this is a bug, we should still try to optimize query by reusing joins when possible but if used in the where clause create two separate ones.

We also have two joins and reference to the both aliases in WHERE clause.

Based on the communication here and Your suggestions, we will change our codebase but I am wondering if this behavior could have been documented more explicitly :slight_smile: