Skip to content

Commit 7461999

Browse files
committed
Merge branch '5.3' into 5.4
* 5.3: Update multiple_entity_managers.rst
2 parents 6090d88 + 101b4b1 commit 7461999

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
@@ -251,6 +251,11 @@ the default entity manager (i.e. ``default``) is returned::
251251
}
252252
}
253253

254+
Entity managers also benefit from :ref:`autowiring aliases <service-autowiring-alias>`
255+
when the :ref:`framework bundle <framework-bundle-configuration>` is used. For
256+
example, to inject the ``customer`` entity manager, type-hint your method with
257+
``EntityManagerInterface $customerEntityManager``.
258+
254259
You can now use Doctrine like you did before - using the ``default`` entity
255260
manager to persist and fetch entities that it manages and the ``customer``
256261
entity manager to persist and fetch its entities.

0 commit comments

Comments
 (0)