em = $om; parent::__construct(); } protected function configure() { $this->setName('joborder:adjust_longlat') ->setDescription('Separate longitude and latitude from coordinate point.') ->setHelp('Get longitude and latitude from existing point type coordinate. Separate into individual fields for reports purposes.'); } protected function execute(InputInterface $input, OutputInterface $output) { // get entity manager $em = $this->em; $job_orders = $em->getRepository(JobOrder::class)->findAll(); // fulfill each foreach ($job_orders as $jo) { $point = $jo->getCoordinates(); $jo->setCoordinates($point); } $em->flush(); } }