File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -254,16 +254,10 @@ 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.
257
+ Entity managers also benefit from :ref: `autowiring aliases <service-autowiring-alias >`
258
+ when the :ref: `framework bundle <framework-bundle-configuration >` is used. For
259
+ example, to inject the ``customer `` entity manager, type-hint your method with
260
+ ``EntityManagerInterface $customerEntityManager ``.
267
261
268
262
You can now use Doctrine like you did before - using the ``default `` entity
269
263
manager to persist and fetch entities that it manages and the ``customer ``
You can’t perform that action at this time.
0 commit comments