Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 7d8864e

Browse files
committed
Merge pull request #708 from symfony-cmf/explain-dbal-connection
explain how to configure a non-default dbal connection
2 parents de94b9e + 5c354c2 commit 7d8864e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

bundles/phpcr_odm/introduction.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ Once you set up Doctrine DBAL, you can configure Jackalope:
162162
session:
163163
backend:
164164
type: doctrinedbal
165+
# connection: default
166+
165167
# requires DoctrineCacheBundle
166168
# caches:
167169
# meta: doctrine_cache.providers.phpcr_meta
@@ -193,6 +195,7 @@ Once you set up Doctrine DBAL, you can configure Jackalope:
193195
logging="true"
194196
profiling="true"
195197
>
198+
<!-- connection="default" - option on <backend> to change dbal connection -->
196199
<!--
197200
<caches
198201
meta="doctrine_cache.providers.phpcr_meta"
@@ -211,6 +214,7 @@ Once you set up Doctrine DBAL, you can configure Jackalope:
211214
'session' => array(
212215
'backend' => array(
213216
'type' => 'doctrinedbal',
217+
//'connection': 'default',
214218
'logging' => true,
215219
'profiling' => true,
216220
//'caches' => array(
@@ -234,7 +238,10 @@ Now make sure the database exists and initialize it:
234238
235239
.. tip::
236240

237-
Of course, you can also use a different connection instead of the default.
241+
You can also use a different doctrine dbal connection instead of the
242+
default. Specify the dbal connection name in the ``connection`` option of
243+
the ``backend`` configuration.
244+
238245
It is recommended to use a separate connection to a separate database if
239246
you also use Doctrine ORM or direct DBAL access to data, rather than
240247
mixing this data with the tables generated by Jackalope Doctrine Dbal. If

0 commit comments

Comments
 (0)