Skip to content

Commit fc9a9c5

Browse files
committed
Tweaks
1 parent 203f440 commit fc9a9c5

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

doctrine/multiple_entity_managers.rst

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -254,16 +254,10 @@ the default entity manager (i.e. ``default``) is returned::
254254
}
255255
}
256256

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``.
267261

268262
You can now use Doctrine like you did before - using the ``default`` entity
269263
manager to persist and fetch entities that it manages and the ``customer``

0 commit comments

Comments
 (0)