开发者

Case insensitive search in hibernate without criteria

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜