X-Git-Url: https://git.rapsys.eu/.gitweb.cgi/airbundle/blobdiff_plain/3ce82b94f5efa2fa21c13eca474553f9a50b862e..f338800ff68dbc6a872e9d428c37cb6a6fd1773d:/Repository/DanceRepository.php?ds=inline diff --git a/Repository/DanceRepository.php b/Repository/DanceRepository.php index 6f64e92..251a1ba 100644 --- a/Repository/DanceRepository.php +++ b/Repository/DanceRepository.php @@ -32,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 @@ -45,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') @@ -69,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; @@ -133,7 +133,7 @@ SQL; $req = << $id, 'type' => $type = $this->translator->trans($name['types'][$k]), 'slug' => $stype = $this->slugger->slug($type), - 'link' => $this->router->generate('rapsys_air_dance_view', ['id' => $id, 'name' => $slug, 'type' => $stype]) + 'link' => $this->router->generate('rapsysair_dance_view', ['id' => $id, 'name' => $slug, 'type' => $stype]) ]; } @@ -229,7 +229,7 @@ SQL; $return[$sname = $this->slugger->short($name['name'])] = [ 'name' => $tname, 'slug' => $slug, - 'link' => $this->router->generate('rapsys_air_dance_name', ['name' => $sname, 'dance' => $slug]), + 'link' => $this->router->generate('rapsysair_dance_name', ['name' => $sname, 'dance' => $slug]), 'types' => $types, 'modified' => $name['modified'] ]; @@ -248,8 +248,8 @@ SQL; public function findByUserId($userId): array { //Set the request $req = 'SELECT d.id, d.name, d.type -FROM RapsysAirBundle:UserDance AS ud -JOIN RapsysAirBundle:Dance AS d ON (d.id = ud.dance_id) +FROM Rapsys\AirBundle\Entity\UserDance AS ud +JOIN Rapsys\AirBundle\Entity\Dance AS d ON (d.id = ud.dance_id) WHERE ud.user_id = :uid'; //Replace bundle entity name by table name @@ -260,7 +260,7 @@ WHERE ud.user_id = :uid'; $rsm = new ResultSetMapping(); //Declare result set for our request - $rsm->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');