I want to do case insensitive search in hibernate Query. I can do it with Criteri开发者_Go百科a but it is not an option for me right now. The method which fire query takes a query string as input and it is used by other components. Is it possible to enable case insensitive for Hibernate session or prepare criteria object from hql query.
You can use the lower
or upper
functions mentioned here.
from User u where lower(u.name) = 'scott'
精彩评论