Skip to content

How to Work with multiple Entity Managers and Connections #10797

@damiarita

Description

@damiarita

I am not sure if this is an issue with the docs or a bug.

I have created a symfony app with 2 Entity Managers and two connections. I followed the examples of https://symfony.com/doc/current/doctrine/multiple_entity_managers.html I only changed the name of the default connection and the default orm. Instead of calling them default I called it BOE

It does not look like a wrong thing to do, as I had default_connection and default_entity_manager keys with value BOE.

It turns out that if I do the cache clear with APP_ENV = dev, it works flawlessly. But if i clear the cache for prod, it gives this error:

Uncaught PHP Exception Doctrine\Common\Persistence\Mapping\MappingException: "The class '{class name here}' was not found in the chain configured namespaces " at....

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions