I think this is a combination of criteria that you want to use (by the way, it is easier to simplify the definition of the hibernate bean entity instead of the table structure):
String[] employeeNames = { "test", "test2" };
List<Survey> surveys = getSession().createCriteria(Survey.class).add(
Restrictions.and
(
Restrictions.eq("surveyNumber", 1),
Restrictions.in("employeeName", employeeNames)
)
).list();
source
share