I have the following two classes (Java Hibernate):
public class Grupo{
//plain Attributes
}
and
public class Salon extends Grupo{
//plain Attributes
}
having objects of both types.
using the following Criteria Query:
s.createCriteria(Grupo.class).list();
I get all the Grupo-type objects, that is Grupo and Salon, as expected. So, what I want to know is that if there is a way in Criteria Query to easily get only the "Grupo" objects that are not "Salon" objects. I will like to refrain of using discriminators if possible (in db both classes have their own tables)
Any help will be highly appreciated.
EDIT: Corrected wrong java syntax, how lame of me.