org.hibernate.query.sqm.produce.function.FunctionArgumentException: Parameter 1 of function 'lower()' has type 'STRING', but argument is of type 'java.lang.String' mapped to 'CLOB'
Why is it not possible to use the lower function?
As I use the lower function together with like, a tried to use the hibernate ilike function.
Most databases do not allow using text functions with CLOBs and require VARCHAR like types. Hibernate ORM tries to find the balance here which might not always be perfect, but if you map a persistent attribute as @Lob, you shouldn’t try to invoke functions on it IMO.
Rather use @JdbcTypeCode(SqlTypes.LONG32VARCHAR), which might still use a CLOB DDL type behind the scenes, but will still allow using all text functions.