Reputation: 12205
I just upgraded to Hibernate 4.1.10.Final (after first upgrading to 4.1.8.Final), but now this does not compile:
Restrictions.eq("loginName", loginName).ignoreCase();
This is due to the ignoreCase()-method no longer existing in the Criterion class. But, I can't find any documentation about this, do I need to replace it with something, or has it been rendered uneccessary since case is always ignored or something?
Upvotes: 3
Views: 1705
Reputation: 121998
Use instead
criteria.add(Restrictions.ilike('prop', '%value%');
or
criteria.add(Restrictions.ilike('prop', 'value', MatchMode.ANYWHERE);
Upvotes: 3