Fixed exception about non-persisted entities, when using the cached StructuralEntityType.

This commit is contained in:
Jan Böhmer 2019-08-21 00:46:45 +02:00
parent 7608d5dbda
commit c7e8fc9642
3 changed files with 115 additions and 4 deletions

View file

@ -72,6 +72,9 @@ abstract class BaseAdminController extends AbstractController
$em->flush();
}
//Rebuild form, so it is based on the updated data. Important for the parent field!
$form = $this->createForm($this->form_class, $entity);
return $this->render($this->twig_template, [
'entity' => $entity,
'form' => $form->createView()