The EntityManager should not be flushed within a loop