Hello,
I have simple set of elements.
Person {
Set<Event> events;
}
Event {
Person person;
String description;
}
I need to do simple query:
Criteria criteria = sesison.createCriteria(Person.class);
criteria.createAlias("events", "event");
criteria.add(Restrictions.or(Restrictions.isEmpty("events"), Restrictions.eq("event.description", "test")));
criteria.list();
With this line:
criteria.createAlias("events", "event");
result is always empty (list size is zero).
What do I do wrong? Isn't it possible to have this OR condition?
Best regards,
Piotrek
_________________ Piotr Bzdyl
|