Created
December 12, 2013 13:29
Revisions
-
jacobsenj revised this gist
Dec 12, 2013 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,6 @@ namespace Application\Repository; use Application\Entity\Name; use Doctrine\ORM\EntityRepository; class NameRepository -
jacobsenj revised this gist
Dec 12, 2013 . No changes.There are no files selected for viewing
-
jacobsenj revised this gist
Dec 12, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use Doctrine\DBAL\LockMode; use Doctrine\ORM\EntityRepository; class NameRepository extends EntityRepository { /** -
jacobsenj revised this gist
Dec 12, 2013 . 1 changed file with 11 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,17 @@ namespace Application\Repository; use Application\Entity\Name; use Doctrine\DBAL\LockMode; use Doctrine\ORM\EntityRepository; class ProjectRepository extends EntityRepository { /** * @return int */ public function getNextNumber() { return $this->getEntityManager()->createQuery('SELECT MAX(n.number) + 1 AS number FROM Application\Entity\Name n')->getSingleScalarResult(); } } -
jacobsenj created this gist
Dec 12, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ /** * @return int */ public function getNextNumber() { return $this->getEntityManager()->createQuery('SELECT MAX(n.number) + 1 AS number FROM Application\Entity\Name n')->getSingleScalarResult(); }