diff --git a/doctrine/multiple_entity_managers.rst b/doctrine/multiple_entity_managers.rst index 178b8f61700..00b8eeded53 100644 --- a/doctrine/multiple_entity_managers.rst +++ b/doctrine/multiple_entity_managers.rst @@ -186,12 +186,25 @@ and ``customer``. The ``default`` entity manager manages entities in the entities in ``src/Entity/Customer``. You've also defined two connections, one for each entity manager. -.. note:: +.. caution:: When working with multiple connections and entity managers, you should be explicit about which configuration you want. If you *do* omit the name of the connection or entity manager, the default (i.e. ``default``) is used. + If you use a different name than ``default`` for the default entity manager, + you will need to redefine the default entity manager in ``prod`` environment + configuration too: + + .. code-block:: yaml + + # config/packages/prod/doctrine.yaml + doctrine: + orm: + default_entity_manager: 'your default entity manager name' + + # ... + When working with multiple connections to create your databases: .. code-block:: terminal