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(); } /**