Hi,
In my application I would like to search for person's firstName, lastName and email. I was wondering what is the preferred way of specifying criteria with more then three or restrictions as LogicalExpression.
This is what I would wanna do:
Code:
Criterion firstName = Restrictions.ilike("firstName",searchStr);
Criterion lastName = Restrictions.ilike("lastName", searchStr);
Criterion email = Restrictions.like("email", searchStr);
LogicalExpression orExp = Restrictions.or(firstName, lastName,email);
but Restrictions.or only accepts two Criterion parameters.