}
public void testPrefetch9() throws Exception {
createTwoArtistsAndTwoPaintingsDataSet();
Expression artistExp = ExpressionFactory.matchExp("artistName", "artist3");
SelectQuery artistQuery = new SelectQuery(Artist.class, artistExp);
Artist artist1 = (Artist) context.performQuery(artistQuery).get(0);
// find the painting not matching the artist (this is the case where such prefetch
// at least makes sense)
Expression exp = ExpressionFactory.noMatchExp("toArtist", artist1);
SelectQuery q = new SelectQuery(Painting.class, exp);
q.addPrefetch("toArtist");
final List<Painting> results = context.performQuery(q);