Skip to content

Commit 93ef5f2

Browse files
committed
[#12393] Rewrote the sentence a bit
1 parent 65c4dfd commit 93ef5f2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

reference/configuration/doctrine.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,13 @@ which is the first one defined or the one configured via the
155155
``default_connection`` parameter.
156156

157157
Each connection is also accessible via the ``doctrine.dbal.[name]_connection``
158-
service where ``[name]`` is the name of the connection. Or directly in the controller with
159-
getConnection method and the name of the connection::
158+
service where ``[name]`` is the name of the connection. In a controller
159+
extending ``AbstractController``, you can access it directly using the
160+
``getConnection()`` method and the name of the connection::
160161

161162
$connection = $this->getDoctrine()->getConnection('customer');
162-
$result = $connection->fetchAll('select name from customer');
163+
164+
$result = $connection->fetchAll('SELECT name FROM customer');
163165

164166
Doctrine ORM Configuration
165167
--------------------------

0 commit comments

Comments
 (0)