Hibernate-Version: 3.2.2.ga
Hello,
I have a entity with a polymorphic association with a abstract class that maps subclasses with joined-subclass.
eg.
Code:
public class Order {
private Set<Item> items = new HashSet<Item>();
...
}
public abstract class Item {
...
}
public class Tshirt extends Item {
...
}
what i want is to restrict Orders entities with only Tshirt items.
The SQL would be something like:
select ... where discriminator = 'tshirt' ...
but i dont know how to express it in Hibernate (Criteria).
thanks.