]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Repository/DanceRepository.php
Replace _em now private with manager member variable
[airbundle] / Repository / DanceRepository.php
index f7986d17c49f667fda12f4089f76085d760598cc..19028226b84d1563b7c1e956b901fb2a1b378e78 100644 (file)
@@ -54,7 +54,7 @@ SQL;
                        ->addIndexByColumn('d', 'id');
 
                //Return return
-               return $this->_em
+               return $this->manager
                        ->createNativeQuery($req, $rsm)
                        ->getResult();
        }
@@ -92,7 +92,7 @@ SQL;
                        ->addIndexByScalar('name');
 
                //Get result
-               $result = $this->_em
+               $result = $this->manager
                        ->createNativeQuery($req, $rsm)
                        ->getArrayResult();
 
@@ -153,7 +153,7 @@ SQL;
                $rsm->addScalarResult('id', 'id', 'integer');
 
                //Return result
-               return $this->_em
+               return $this->manager
                        ->createNativeQuery($req, $rsm)
                        ->setParameter('nametype', $nametype)
                        //XXX: instead of array_column on the result
@@ -191,11 +191,11 @@ SQL;
                $rsm->addScalarResult('id', 'id', 'integer')
                        ->addScalarResult('name', 'name', 'string')
                        ->addScalarResult('type', 'type', 'string')
-                       ->addScalarResult('modified', 'modified', 'datetime')
+                       ->addScalarResult('modified', 'modified', 'datetime_immutable')
                        ->addIndexByScalar('id');
 
                //Get result
-               $result = $this->_em
+               $result = $this->manager
                        ->createNativeQuery($req, $rsm)
                        ->setParameter('id', $id)
                        ->getOneOrNullResult();
@@ -297,11 +297,11 @@ SQL;
                $rsm->addScalarResult('name', 'name', 'string')
                        ->addScalarResult('ids', 'ids', 'string')
                        ->addScalarResult('types', 'types', 'string')
-                       ->addScalarResult('modified', 'modified', 'datetime')
+                       ->addScalarResult('modified', 'modified', 'datetime_immutable')
                        ->addIndexByScalar('name');
 
                //Get result
-               $result = $this->_em
+               $result = $this->manager
                        ->createNativeQuery($req, $rsm)
                        ->getArrayResult();
 
@@ -374,7 +374,7 @@ WHERE ud.user_id = :uid';
                $rsm->addFieldResult('d', 'type', 'type');
 
                //Send result
-               return $this->_em
+               return $this->manager
                        ->createNativeQuery($req, $rsm)
                        ->setParameter('uid', $userId)
                        ->getResult();