try { $schemaTool->
createSchema($classes);
} catch (\Exception
$e) { } } protected function getExtensions() { return array_merge(parent::
getExtensions(),
[ new DoctrineOrmExtension($this->emRegistry
),
]);
} protected function persist(array
$entities) { foreach ($entities as $entity) { $this->em->
persist($entity);
} $this->em->
flush();
// no clear, because entities managed by the choice field must