File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -155,11 +155,13 @@ which is the first one defined or the one configured via the
155
155
``default_connection `` parameter.
156
156
157
157
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::
160
161
161
162
$connection = $this->getDoctrine()->getConnection('customer');
162
- $result = $connection->fetchAll('select name from customer');
163
+
164
+ $result = $connection->fetchAll('SELECT name FROM customer');
163
165
164
166
Doctrine ORM Configuration
165
167
--------------------------
You can’t perform that action at this time.
0 commit comments