Skip to content

Commit 668e336

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: Update multiple_entity_managers.rst
2 parents ba07138 + fc9a9c5 commit 668e336

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doctrine/multiple_entity_managers.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,11 @@ the default entity manager (i.e. ``default``) is returned::
261261
}
262262
}
263263

264+
Entity managers also benefit from :ref:`autowiring aliases <service-autowiring-alias>`
265+
when the :ref:`framework bundle <framework-bundle-configuration>` is used. For
266+
example, to inject the ``customer`` entity manager, type-hint your method with
267+
``EntityManagerInterface $customerEntityManager``.
268+
264269
You can now use Doctrine like you did before - using the ``default`` entity
265270
manager to persist and fetch entities that it manages and the ``customer``
266271
entity manager to persist and fetch its entities.

0 commit comments

Comments
 (0)