import org.apache.cayenne.jpa.itest.ch2.entity.SingleTableInheritanceSuper1;
public class _2_1_10_1_SingleTablePerClassTest extends EntityManagerCase {
public void testSelectSuper() throws Exception {
ItestTableUtils helper = getTableHelper("ST_INHERITANCE");
helper.deleteAll();
helper.setColumns("id", "objectType", "propertyA", "propertyB", "propertyC");
helper.insert(1, "A", "1", null, null);
helper.insert(2, "A", "2", null, null);
helper.insert(3, "B", "3", "BX", null);
helper.insert(4, "C", "4", null, "CX");
Query query = getEntityManager().createQuery(
"select a FROM SingleTableInheritanceSuper1 a ORDER BY a.propertyA");
List<?> results = query.getResultList();
assertEquals(4, results.size());