Skip to content

Allow specifying connection used by foundry #700

@BackEndTea

Description

@BackEndTea

Currently its not possible to specify the connection that is used by foundry for the inserts.
This is a problem for me as the project i'm working on uses multiple connections, and the default connection may not have
insert rights for the entity i want to persist.

In the flow of the application the correct connection would be used for inserts, but this is not possible to configure for foundry.

Right now we can already specify the connection/entity manger to be used for resets: https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#database-reset

However we can't specify the connection that does the inserts. I would like something like

zenstruck_foundry:
   default_entity_manager: my_manager # defaults to doctrine.orm.default_entity_manager

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions