Hibernate criteria JOIN + additional condition (with clause) does not work for ElementCollection's

Description

Using an outer join on an element collection with additional where clause does not inject the where clause in the actual query.

It does add the parameter(s) to the query, so if there are any parameters a jdbc exception is caused by the mismatch in the parameters.

Was able to trace the cause back to the fix for HHH-7355:
https://github.com/hibernate/hibernate-orm/pull/1117/files

Test case:

Environment

postgresql 9, java 11, wildfly 18, hibernate 5.3.12.Final

Status

Assignee

Unassigned

Reporter

Wiebren Braakman

Fix versions

None

Labels

None

backPortable

Backport?

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.1.0

Components

Affects versions

Priority

Major
Configure