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?