public void testReadNestedPropertyToManyInMiddle1() throws Exception {
DataContext context = createDataContext();
Artist a = context.newObject(Artist.class);
ArtistExhibit ex = context.newObject(ArtistExhibit.class);
Painting p1 = context.newObject(Painting.class);
Painting p2 = context.newObject(Painting.class);
p1.setPaintingTitle("p1");
p2.setPaintingTitle("p2");
a.addToPaintingArray(p1);
a.addToPaintingArray(p2);
ex.setToArtist(a);
List<String> names = (List<String>) a.readNestedProperty("paintingArray+.paintingTitle");
assertEquals(names.size(), 2);
assertEquals(names.get(0), "p1");
assertEquals(names.get(1), "p2");
List<String> names2 = (List<String>)
ex.readNestedProperty("toArtist.paintingArray+.paintingTitle");
assertEquals(names, names2);
}