deleteTestData();
createTestData("testRefreshObjectToMany");
DataContext context = createDataContext();
Artist a = Cayenne.objectForPK(context, Artist.class, 33001l);
assertEquals(2, a.getPaintingArray().size());
createTestData("testRefreshObjectToManyUpdate");
RefreshQuery refresh = new RefreshQuery(a);
context.performQuery(refresh);
assertEquals(PersistenceState.HOLLOW, a.getPersistenceState());
assertEquals(1, a.getPaintingArray().size());
}