SelectQuery q = new SelectQuery(CompoundPkTestEntity.class, e);
q.addPrefetch("compoundFkArray");
List pks = context.performQuery(q);
assertEquals(1, pks.size());
CayenneDataObject pk1 = (CayenneDataObject) pks.get(0);
List toMany = (List) pk1.readPropertyDirectly("compoundFkArray");
assertNotNull(toMany);
assertFalse(((ValueHolder) toMany).isFault());
assertEquals(2, toMany.size());
CayenneDataObject fk1 = (CayenneDataObject) toMany.get(0);
assertEquals(PersistenceState.COMMITTED, fk1.getPersistenceState());
CayenneDataObject fk2 = (CayenneDataObject) toMany.get(1);
assertEquals(PersistenceState.COMMITTED, fk2.getPersistenceState());
}