seasonRepository->findAll() as $season) { if (null !== $season->getSettings()) { continue; } $io->text('Adding settings to season : '.$season->getSeasonCode()); $season->setSettings(new SeasonSettings()); } $this->entityManager->flush(); return Command::SUCCESS; } }