public void testTwoJoinProperty() { ToManyEntity entity = new ToManyEntity(1L); entity.setSourceJoinProperty("JOIN ME"); daoSession.insert(entity); insertTargetEntities(1L, 3, "JOIN ME"); ToManyEntity testEntity = toManyEntityDao.load(1L); List<ToManyTargetEntity> targetEntities = testEntity.getToManyJoinTwo(); assertEquals(3, targetEntities.size()); ToManyTargetEntity middleEntity = targetEntities.get(1); middleEntity.setTargetJoinProperty("DON'T JOIN ME"); toManyTargetEntityDao.update(middleEntity); testEntity.resetToManyJoinTwo(); targetEntities = testEntity.getToManyJoinTwo(); assertEquals(2, targetEntities.size()); assertFalse(middleEntity.getId() == targetEntities.get(0).getId()); assertFalse(middleEntity.getId() == targetEntities.get(1).getId()); }