]> Raphaƫl G. Git Repositories - blogbundle/blobdiff - Repository/KeywordRepository.php
Version 0.0.2
[blogbundle] / Repository / KeywordRepository.php
index 555f1070f5ad48222f8c99a48c19d11816dd3905..db25c18c4313577732e0b9ff62f63af924702a93 100644 (file)
@@ -13,13 +13,15 @@ namespace Rapsys\BlogBundle\Repository;
 
 use Doctrine\ORM\Query\ResultSetMapping;
 
 
 use Doctrine\ORM\Query\ResultSetMapping;
 
+use Rapsys\BlogBundle\Repository;
+
 /**
  * KeywordRepository
  *
  * This class was generated by the Doctrine ORM. Add your own custom
  * repository methods below.
  */
 /**
  * KeywordRepository
  *
  * This class was generated by the Doctrine ORM. Add your own custom
  * repository methods below.
  */
-class KeywordRepository extends EntityRepository {
+class KeywordRepository extends Repository {
        /**
         * Find keyword count as int
         *
        /**
         * Find keyword count as int
         *
@@ -46,7 +48,7 @@ SQL;
                $rsm->addScalarResult('count', 'count', 'integer');
 
                //Get result
                $rsm->addScalarResult('count', 'count', 'integer');
 
                //Get result
-               return $this->_em
+               return $this->manager
                        ->createNativeQuery($req, $rsm)
                        ->getSingleScalarResult();
        }
                        ->createNativeQuery($req, $rsm)
                        ->getSingleScalarResult();
        }
@@ -90,13 +92,13 @@ SQL;
                        ->addScalarResult('description', 'description', 'string')
                        ->addScalarResult('slug', 'slug', 'string')
                        ->addScalarResult('title', 'title', 'string')
                        ->addScalarResult('description', 'description', 'string')
                        ->addScalarResult('slug', 'slug', 'string')
                        ->addScalarResult('title', 'title', 'string')
-                       ->addScalarResult('created', 'created', 'datetime')
-                       ->addScalarResult('updated', 'updated', 'datetime')
-                       ->addScalarResult('modified', 'modified', 'datetime')
+                       ->addScalarResult('created', 'created', 'datetime_immutable')
+                       ->addScalarResult('updated', 'updated', 'datetime_immutable')
+                       ->addScalarResult('modified', 'modified', 'datetime_immutable')
                        ->addIndexByScalar('id');
 
                //Get result
                        ->addIndexByScalar('id');
 
                //Get result
-               $result = $this->_em
+               $result = $this->manager
                        ->createNativeQuery($req, $rsm)
                        ->setParameter('offset', $page * $count)
                        ->setParameter('count', $count)
                        ->createNativeQuery($req, $rsm)
                        ->setParameter('offset', $page * $count)
                        ->setParameter('count', $count)
@@ -230,12 +232,12 @@ SQL;
                        ->addScalarResult('ckt_locales', 'ckt_locales', 'string')
                        ->addScalarResult('ckt_slugs', 'ckt_slugs', 'string')
                        ->addScalarResult('ckt_titles', 'ckt_titles', 'string')
                        ->addScalarResult('ckt_locales', 'ckt_locales', 'string')
                        ->addScalarResult('ckt_slugs', 'ckt_slugs', 'string')
                        ->addScalarResult('ckt_titles', 'ckt_titles', 'string')
-                       ->addScalarResult('created', 'created', 'datetime')
-                       ->addScalarResult('updated', 'updated', 'datetime')
-                       ->addScalarResult('modified', 'modified', 'datetime');
+                       ->addScalarResult('created', 'created', 'datetime_immutable')
+                       ->addScalarResult('updated', 'updated', 'datetime_immutable')
+                       ->addScalarResult('modified', 'modified', 'datetime_immutable');
 
                //Get data
 
                //Get data
-               $data = $this->_em
+               $data = $this->manager
                        ->createNativeQuery($req, $rsm)
                        ->setParameter('id', $id)
                        ->getOneOrNullResult();
                        ->createNativeQuery($req, $rsm)
                        ->setParameter('id', $id)
                        ->getOneOrNullResult();