6

I've googled a bit but found no decent solutions...

What i would like to achieve, source comes firts :)

 List<MyStuff> result =
 session.createCriteria(MyStuff.class)
 .add(Restrictions.in("name", templates)).list();

templates is a Collection, thing is, I would like to get all myStuffs, that have name column matching-CASE-INSENSITIVELY to any of templates.

Possible without looping and iliking for every element of templates?

wilu
  • 549
  • 1
  • 12
  • 26

1 Answers1

2

Unfortunately this feature is not implemented in the Criteria API. You must implement your own InExpression. See the answer in Ignorecase for In-Criterion

Community
  • 1
  • 1
Cengiz
  • 5,375
  • 6
  • 52
  • 77