//q.setOrdering("name ascending");
Collection results = (Collection) q.getResultList();
assertEquals(2, results.size());
Iterator itr = results.iterator();
EagerOuterJoinPC pc = (EagerOuterJoinPC) itr.next();
assertEquals("1", pc.getName());
EagerOuterJoinPC2 hpc;
if ((empty & 1) > 0)
assertEquals(0, pc.getManyManyList().size());
else {
assertEquals(2, pc.getManyManyList().size());
hpc = (EagerOuterJoinPC2) pc.getManyManyList().get(0);
assertEquals("1.1", hpc.getName());
hpc = (EagerOuterJoinPC2) pc.getManyManyList().get(1);
assertEquals("1.2", hpc.getName());
}
pc = (EagerOuterJoinPC) itr.next();
assertEquals("2", pc.getName());
if ((empty & 2) > 0)
assertEquals(0, pc.getManyManyList().size());
else {
assertEquals(2, pc.getManyManyList().size());
hpc = (EagerOuterJoinPC2) pc.getManyManyList().get(0);
assertEquals("2.1", hpc.getName());
hpc = (EagerOuterJoinPC2) pc.getManyManyList().get(1);
assertEquals("2.2", hpc.getName());
}
assertTrue(!itr.hasNext());
pm.close();