From c1b7aec0ab507d25408f757889896c52ec4fd4d7 Mon Sep 17 00:00:00 2001 From: Hector Prats Date: Mon, 30 Sep 2019 16:20:52 +0200 Subject: [PATCH] Update doctrine.rst --- reference/configuration/doctrine.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index 7600f1f07a7..25030f22385 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -155,7 +155,11 @@ which is the first one defined or the one configured via the ``default_connection`` parameter. Each connection is also accessible via the ``doctrine.dbal.[name]_connection`` -service where ``[name]`` is the name of the connection. +service where ``[name]`` is the name of the connection. Or directly in the controller with +getConnection method and the name of the connection:: + + $connection = $this->getDoctrine()->getConnection('customer'); + $result = $connection->fetchAll('select name from customer'); Doctrine ORM Configuration --------------------------