From 1880cbd8b628cd59b7c6113deacaf45a895e8313 Mon Sep 17 00:00:00 2001 From: Tony Nelson Date: Tue, 5 Jul 2016 12:46:16 -0500 Subject: [PATCH 1/2] Update dql-doctrine-query-language.rst --- docs/en/reference/dql-doctrine-query-language.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/reference/dql-doctrine-query-language.rst b/docs/en/reference/dql-doctrine-query-language.rst index ae4ee11e8..6f9874411 100644 --- a/docs/en/reference/dql-doctrine-query-language.rst +++ b/docs/en/reference/dql-doctrine-query-language.rst @@ -909,7 +909,7 @@ An instance of the ``Doctrine\ORM\Query`` class represents a DQL query. You create a Query instance be calling ``EntityManager#createQuery($dql)``, passing the DQL query string. Alternatively you can create an empty ``Query`` instance and invoke -``Query#setDql($dql)`` afterwards. Here are some examples: +``Query#setDQL($dql)`` afterwards. Here are some examples: .. code-block:: php @@ -919,9 +919,9 @@ Alternatively you can create an empty ``Query`` instance and invoke // example1: passing a DQL string $q = $em->createQuery('select u from MyProject\Model\User u'); - // example2: using setDql + // example2: using setDQL $q = $em->createQuery(); - $q->setDql('select u from MyProject\Model\User u'); + $q->setDQL('select u from MyProject\Model\User u'); Query Result Formats ~~~~~~~~~~~~~~~~~~~~ From cd36407f28691dba06bcc6864d8d9c3b567d6cbc Mon Sep 17 00:00:00 2001 From: Tony Nelson Date: Tue, 5 Jul 2016 12:48:00 -0500 Subject: [PATCH 2/2] Update EntityManager.php --- lib/Doctrine/ORM/EntityManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/EntityManager.php b/lib/Doctrine/ORM/EntityManager.php index 7a2e378fb..4de4932bc 100644 --- a/lib/Doctrine/ORM/EntityManager.php +++ b/lib/Doctrine/ORM/EntityManager.php @@ -290,7 +290,7 @@ use Doctrine\Common\Util\ClassUtils; $query = new Query($this); if ( ! empty($dql)) { - $query->setDql($dql); + $query->setDQL($dql); } return $query; @@ -311,7 +311,7 @@ use Doctrine\Common\Util\ClassUtils; { $query = new NativeQuery($this); - $query->setSql($sql); + $query->setSQL($sql); $query->setResultSetMapping($rsm); return $query;