From b145ebf955e4a1dcebf4232007b4b2979ce11000 Mon Sep 17 00:00:00 2001 From: Nechaev Yaroslav Date: Thu, 27 Mar 2014 15:45:52 +0300 Subject: [PATCH 1/2] Typo in documentation This method from AbstractQuery accepts constants from ClassMetadata rather than string --- docs/en/reference/dql-doctrine-query-language.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/reference/dql-doctrine-query-language.rst b/docs/en/reference/dql-doctrine-query-language.rst index 0e342f862..c15df9bde 100644 --- a/docs/en/reference/dql-doctrine-query-language.rst +++ b/docs/en/reference/dql-doctrine-query-language.rst @@ -1363,7 +1363,7 @@ can mark a many-to-one or one-to-one association as fetched temporarily to batch createQuery("SELECT u FROM MyProject\User u"); - $query->setFetchMode("MyProject\User", "address", "EAGER"); + $query->setFetchMode("MyProject\User", "address", Doctrine\ORM\Mapping\ClassMetadata\FETCH_EAGER); $query->execute(); Given that there are 10 users and corresponding addresses in the database the executed queries will look something like: From 46b16a5e1010f215e5ed58153177493c2c50b93a Mon Sep 17 00:00:00 2001 From: Nechaev Yaroslav Date: Thu, 27 Mar 2014 15:49:04 +0300 Subject: [PATCH 2/2] Update dql-doctrine-query-language.rst --- docs/en/reference/dql-doctrine-query-language.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/reference/dql-doctrine-query-language.rst b/docs/en/reference/dql-doctrine-query-language.rst index c15df9bde..3d465f632 100644 --- a/docs/en/reference/dql-doctrine-query-language.rst +++ b/docs/en/reference/dql-doctrine-query-language.rst @@ -1363,7 +1363,7 @@ can mark a many-to-one or one-to-one association as fetched temporarily to batch createQuery("SELECT u FROM MyProject\User u"); - $query->setFetchMode("MyProject\User", "address", Doctrine\ORM\Mapping\ClassMetadata\FETCH_EAGER); + $query->setFetchMode("MyProject\User", "address", \Doctrine\ORM\Mapping\ClassMetadata::FETCH_EAGER); $query->execute(); Given that there are 10 users and corresponding addresses in the database the executed queries will look something like: