q.addPrefetch("exhibitArray.artistExhibitArray");
List galleries = context.performQuery(q);
assertEquals(1, galleries.size());
Gallery g2 = (Gallery) galleries.get(0);
// this relationship should be resolved
assertTrue(g2.readPropertyDirectly("exhibitArray") instanceof ValueHolder);
List exhibits = (List) g2.readPropertyDirectly("exhibitArray");
assertFalse(((ValueHolder) exhibits).isFault());
assertEquals(1, exhibits.size());
Exhibit e1 = (Exhibit) exhibits.get(0);
assertEquals(PersistenceState.COMMITTED, e1.getPersistenceState());