We're updating the issue view to help you get more done. 

Allow to bind custom types that implement the Collection interface through JPA APIs

Description

Right now, when a value that is an instance of java.util.Collection is passed as parameter value, it will be added as parameter list as can be seen here: https://github.com/hibernate/hibernate-orm/blob/master/hibernate-entitymanager/src/main/java/org/hibernate/jpa/internal/QueryImpl.java#L237
When having a custom user type that implements java.util.Collection this will obviously not work as expected. The parameter will be expanded and binding the values will not use the custom user type.
Since the parameter metadata is already known, it shouldn't be that hard to check if a parameter should be bound as collection or as a single parameter.

Environment

None

Status

Assignee

Steve Ebersole

Reporter

Christian Beikov

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

5.0.4

Priority

Major