Unable to filter criteria by attribute with @Convert

Description

Trying to filter a query by an attribute with @Convert is failling. I have tried to find a workaround with no success.

The case is simple (attached), there is a class with an attribute of type Set. This attribute is wanted to be saved as a String (VARCHAR) in database.

Converter translates from Set to String and viceversa

I have tried 3 ways of doing this leading me to open this issue:

  1. isMember

    //java.lang.IllegalArgumentException: unknown collection expression type [org.hibernate.jpa.criteria.path.SingularAttributePath]

  1. equalToSet

    // java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Set

  2. equalToString

    // java.lang.IllegalArgumentException: Parameter value [CAI] did not match expected type [java.util.Set (n/a)]

Environment

None

Assignee

Unassigned

Reporter

Federico Gaule

Fix versions

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure