public void testJointPrefetchDataRows() throws Exception {
createTestData("testJointPrefetch1");
// query with to-many joint prefetches
SelectQuery q = new SelectQuery(Painting.class);
q.addOrdering("db:PAINTING_ID", SortOrder.ASCENDING);
q.setFetchingDataRows(true);
q.addPrefetch(Painting.TO_ARTIST_PROPERTY).setSemantics(
PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS);
DataContext context = createDataContext();
List rows = context.performQuery(q);