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 38b8860 + cf407e1 commit d4419b2Copy full SHA for d4419b2
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