Can JPQL execute LIKE expressions on enumerations?
If I have a Foo entity with an enum field strip, I can do the following in MySQL (the string is stored as a MySQL enumeration) ...
SELECT * FROM Foo WHERE `bar` LIKE '%SUFFIX'
However, the corresponding query in JPQL ...
SELECT f FROM Foo f WHERE f.bar LIKE '%SUFFIX'
... complains that ...
Parameter value [%SUFFIX] was not matching type [com.example.Foo$EnumType]
source
share