void doJoinMoreThanTwo(boolean exposePrimaryKeys) throws Exception {
dataStore.setExposePrimaryKeyColumns(exposePrimaryKeys);
FilterFactory ff = dataStore.getFilterFactory();
Query q = new Query(tname("ftjoin"));
q.getJoins().add(new Join(tname("ft1"),
ff.equal(ff.property(aname("name")), ff.property(aname("stringProperty")), true)));
q.getJoins().add(new Join(tname("ftjoin2"),
ff.equal(ff.property(aname("join2intProperty")), ff.property(aname("join1intProperty")), true)));
SimpleFeatureCollection features = dataStore.getFeatureSource(tname("ftjoin")).getFeatures(q);
assertEquals(3, features.size());