Hi,
As somu said, you can call
Restriction.or several times, so you may code something like that:
Code:
// 3 restrictions
criterio.add(Restrictions.or(
Restrictions.or(Restrictions.eq("column1", "1"),Restrictions.eq("column1", "2")),
Restrictions.eq("column1", "3")
));
or
Code:
//4 restrinctions
criterio.add(Restrictions.or(
Restrictions.or(Restrictions.eq("column1", "1"),Restrictions.eq("column1", "2")),
Restrictions.or(Restrictions.eq("column1", "3"),Restrictions.eq("column1", "4"))
));
Also I think you could try
in restriction. If you are going to use the same column (column1).
Code:
select * from table where table.column1 IN ('something', 'something else' , 'something else else'...)