From 495fe6002d73ea8b548bfbc77eb5553bad357ffa Mon Sep 17 00:00:00 2001 From: Ronan Guilloux Date: Thu, 29 May 2014 16:29:49 +0200 Subject: [PATCH 1/2] Update query-builder.rst ->andWhere() can be used directly, without any ->where() before, and we can just always use ->andWhere(). This is why ->hasWhere() is useless, cf. #1043. --- docs/en/reference/query-builder.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/en/reference/query-builder.rst b/docs/en/reference/query-builder.rst index 2c48f9dba..a5d364bc8 100644 --- a/docs/en/reference/query-builder.rst +++ b/docs/en/reference/query-builder.rst @@ -156,6 +156,8 @@ Here is a complete list of helper methods available in ``QueryBuilder``: // Example - $qb->where('u.firstName = ?1 AND u.surname = ?2') public function where($where); + // NOTE: ->andWhere() can be used directly, without any ->where() before + // // Example - $qb->andWhere($qb->expr()->orX($qb->expr()->lte('u.age', 40), 'u.numChild = 0')) public function andWhere($where); @@ -518,7 +520,7 @@ of DQL. It takes 3 parameters: ``$dqlPartName``, ``$dqlPart`` and // "SELECT u FROM User u WHERE u.id = ? ORDER BY u.name ASC" // using QueryBuilder string support $qb->add('select', 'u') - ->add('from', 'User u') + ->add('from', 'UserH u') ->add('where', 'u.id = ?1') ->add('orderBy', 'u.name ASC'); From 526c7579015cad576667ed48e0d68c72173b7a11 Mon Sep 17 00:00:00 2001 From: Ronan Guilloux Date: Thu, 29 May 2014 16:36:22 +0200 Subject: [PATCH 2/2] Update query-builder.rst --- docs/en/reference/query-builder.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/reference/query-builder.rst b/docs/en/reference/query-builder.rst index a5d364bc8..fba2d75ec 100644 --- a/docs/en/reference/query-builder.rst +++ b/docs/en/reference/query-builder.rst @@ -520,7 +520,7 @@ of DQL. It takes 3 parameters: ``$dqlPartName``, ``$dqlPart`` and // "SELECT u FROM User u WHERE u.id = ? ORDER BY u.name ASC" // using QueryBuilder string support $qb->add('select', 'u') - ->add('from', 'UserH u') + ->add('from', 'User u') ->add('where', 'u.id = ?1') ->add('orderBy', 'u.name ASC');