I've problems understanding how to create a criteria query with related classes and 'or' condition
some pseudo code...
Code:
class Customer {
private String name;
}
class Order {
private Customer deliverTo;
private Customer billTo;
}
I want to create a query that finds all orders which are related to a customer (e.g. John) either by the deliverTo or the billTo relation.
I don't get how to to this with the criteria api.
I think the Expression.or could do the trick but how to use this with the related classes?