From d458f009c6dc282607715fa48efd475ae616d523 Mon Sep 17 00:00:00 2001 From: Maxim Peshehonov Date: Tue, 26 May 2020 16:55:42 +0300 Subject: [PATCH] #947 --- Datatable/AbstractDatatable.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Datatable/AbstractDatatable.php b/Datatable/AbstractDatatable.php index 3778c8c1..dde8544b 100755 --- a/Datatable/AbstractDatatable.php +++ b/Datatable/AbstractDatatable.php @@ -184,7 +184,7 @@ public function __construct( $this->doctrine = $doctrine; $this->twig = $twig; - $this->em = $em = $this->getDoctrine()->getManager(); + $this->em = $em = $this->getEntityManager(); $metadata = $em->getClassMetadata($this->getEntity()); $this->columnBuilder = new ColumnBuilder($metadata, $twig, $router, $this->getName(), $em); @@ -288,7 +288,7 @@ public function getDoctrine() */ public function getEntityManager() { - return $this->em; + return $this->getDoctrine()->getManager(); } /**