8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 211503e + 93ef5f2 commit cf407e1Copy full SHA for cf407e1
reference/configuration/doctrine.rst
@@ -155,7 +155,13 @@ which is the first one defined or the one configured via the
155
``default_connection`` parameter.
156
157
Each connection is also accessible via the ``doctrine.dbal.[name]_connection``
158
-service where ``[name]`` is the name of the connection.
+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::
161
+
162
+ $connection = $this->getDoctrine()->getConnection('customer');
163
164
+ $result = $connection->fetchAll('SELECT name FROM customer');
165
166
Doctrine ORM Configuration
167
--------------------------
0 commit comments