person.insert(6, "e", "C", null);
}
public void testSelect() throws Exception {
EJBQLQuery superclass = new EJBQLQuery(
"select p from AbstractPerson p ORDER BY p.name");
List<?> superclassResult = context.performQuery(superclass);
assertEquals(5, superclassResult.size());
assertEquals(Employee.class.getName(), superclassResult
.get(0)
.getClass()
.getName());
assertEquals(Employee.class.getName(), superclassResult
.get(1)
.getClass()
.getName());
assertEquals(Manager.class.getName(), superclassResult
.get(2)
.getClass()
.getName());
assertEquals(Manager.class.getName(), superclassResult
.get(3)
.getClass()
.getName());
assertEquals(CustomerRepresentative.class.getName(), superclassResult
.get(4)
.getClass()
.getName());
EJBQLQuery subclass = new EJBQLQuery("select e from Employee e ORDER BY e.name");
List<?> subclassResult = context.performQuery(subclass);
assertEquals(4, subclassResult.size());
assertEquals(Employee.class.getName(), subclassResult.get(0).getClass().getName());