FlattenedTest1.class,
"SELECT * FROM COMPLEX_JOIN");
joinSelect.setFetchingDataRows(true);
assertEquals(3, context.performQuery(joinSelect).size());
FlattenedTest1 ft1 = Cayenne
.objectForPK(context, FlattenedTest1.class, 2);
assertEquals("ft12", ft1.getName());
List related = ft1.getFt3OverComplex();
assertTrue(((ValueHolder) related).isFault());
assertEquals(2, related.size());
FlattenedTest3 ft3 = Cayenne
.objectForPK(context, FlattenedTest3.class, 3);
assertTrue(related.contains(ft3));
ft1.removeFromFt3OverComplex(ft3);
assertFalse(related.contains(ft3));
context.commitChanges();
// the thing here is that there are two join records between
// FT1 and FT3 (emulating invalid data or extras in the join table that