Case-insensitive hibernation search without criteria

I want to make case insensitive in a sleeping request. I can do this using criteria, but right now this is not an option for me. The method that invokes the query request introduces the query string as input and is used by other components. Is it possible to resolve a case insensitive to a Hibernate session, or to prepare a criteria object from an hql request.

+3
source share
1 answer

You can use the functions loweror uppermentioned here .

from User u where lower(u.name) = 'scott'
+3
source

Source: https://habr.com/ru/post/1771895/


All Articles