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