开发者

Case insensitive search in hibernate without criteria

开发者 https://www.devze.com 2023-01-22 13:42 出处:网络
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

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'
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号