X-Git-Url: https://git.rapsys.eu/airbundle/blobdiff_plain/0f0d50eb8832ffe2e1c3d8f40f64d384e6b94b5d..b6254d64cac5b484571017e269eef3fcf982a9e8:/Repository/DanceRepository.php diff --git a/Repository/DanceRepository.php b/Repository/DanceRepository.php index e7dd475..98a6ee9 100644 --- a/Repository/DanceRepository.php +++ b/Repository/DanceRepository.php @@ -14,6 +14,8 @@ namespace Rapsys\AirBundle\Repository; use Doctrine\ORM\AbstractQuery; use Doctrine\ORM\Query\ResultSetMapping; +use Rapsys\AirBundle\Repository; + /** * DanceRepository */ @@ -30,7 +32,7 @@ SELECT d.id, d.name, d.type -FROM RapsysAirBundle:Dance AS d +FROM Rapsys\AirBundle\Entity\Dance AS d SQL; //Replace bundle entity name by table name @@ -43,7 +45,7 @@ SQL; //Declare all fields //XXX: see vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/Types.php //addScalarResult($sqlColName, $resColName, $type = 'string'); - $rsm->addEntityResult('RapsysAirBundle:Dance', 'd') + $rsm->addEntityResult('Rapsys\AirBundle\Entity\Dance', 'd') ->addFieldResult('d', 'id', 'id') ->addFieldResult('d', 'name', 'name') ->addFieldResult('d', 'type', 'type') @@ -67,7 +69,7 @@ SELECT d.name, GROUP_CONCAT(d.id ORDER BY d.id SEPARATOR "\\n") AS ids, GROUP_CONCAT(d.type ORDER BY d.id SEPARATOR "\\n") AS types -FROM RapsysAirBundle:Dance AS d +FROM Rapsys\AirBundle\Entity\Dance AS d GROUP BY d.name ORDER BY d.name SQL; @@ -131,7 +133,7 @@ SQL; $req = <<addEntityResult('RapsysAirBundle:Dance', 'd'); + $rsm->addEntityResult('Rapsys\AirBundle\Entity\Dance', 'd'); $rsm->addFieldResult('d', 'id', 'id'); $rsm->addFieldResult('d', 'name', 'name'); $rsm->addFieldResult('d', 'type', 'type');