In JPQL in a where condition I want to do:
book.id like lower(:search)
The problem: book.id
is a Long
but the :search
parameter is a String. Will the above just work the way it is or do I need to explicitly convert book.id
to String
and if that's the case, how do I do it?
I would convert
:search
parameter toLong
and change the query condition to:then
In general processing numbers is faster than strings.