Skip to content

Commit 12116aa

Browse files
authored
Fix docs regarding query hints (#12328)
1 parent 2491c4b commit 12116aa

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

docs/en/reference/query-builder.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,19 +344,18 @@ the Query object which can be retrieved from ``EntityManager#createQuery()``.
344344
Executing a Query
345345
^^^^^^^^^^^^^^^^^
346346

347-
The QueryBuilder is a builder object only - it has no means of actually
348-
executing the Query. Additionally a set of parameters such as query hints
349-
cannot be set on the QueryBuilder itself. This is why you always have to convert
350-
a querybuilder instance into a Query object:
347+
The QueryBuilder is only a builder object - it has no means of actually
348+
executing the Query. Additional functionality, such as enabling the result cache,
349+
cannot be set on the QueryBuilder itself. This is why you must always convert
350+
a QueryBuilder instance into a Query object:
351351

352352
.. code-block:: php
353353
354354
<?php
355355
// $qb instanceof QueryBuilder
356356
$query = $qb->getQuery();
357357
358-
// Set additional Query options
359-
$query->setQueryHint('foo', 'bar');
358+
// Enable the result cache
360359
$query->enableResultCache(3600, 'my_custom_id');
361360
362361
// Execute Query

0 commit comments

Comments
 (0)