File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,17 @@ the default entity manager (i.e. ``default``) is returned::
254
254
}
255
255
}
256
256
257
+ You can leverage the service binding feature to reference the ``customer ``
258
+ entity manager so that you can inject it directly::
259
+
260
+ services:
261
+ _defaults:
262
+ bind:
263
+ $customerEntityManager: '@doctrine.orm.customer_entity_manager'
264
+
265
+ Now type-hint your method with ``EntityManagerInterface $customerEntityManager ``
266
+ to inject this second entity manager as dependency.
267
+
257
268
You can now use Doctrine like you did before - using the ``default `` entity
258
269
manager to persist and fetch entities that it manages and the ``customer ``
259
270
entity manager to persist and fetch its entities.
You can’t perform that action at this time.
0 commit comments