IllegalArgumentException: Parameter value [...] did not match expected type

Description

Executing a named query where a custom type is a parameter in the where clause. In Hibernate 3 a string value (since the custom type encapsulates a set of strings) was bound directly to the query and this worked. In Hibernate 4 (e.g. 4.2) and 5 (5.3/5.4) this fails with an exception.

None of the code was altered during the migration (other than adding an unusued session parameter to the nullSafeSet/nullSafeGet methods as required by the UserType interface changes in later Hibernate releases).

Was this intended behavior in Hibernate 3 and should it still be possible in Hibernate 5?

Environment

None

Status

Assignee

Gail Badner

Reporter

Stephen Fikes

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

3.3.2

Components

Affects versions

Priority

Major
Configure