Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable to select Enity Manager #40

Open
tikoflano opened this issue Jul 28, 2020 · 0 comments
Open

Enable to select Enity Manager #40

tikoflano opened this issue Jul 28, 2020 · 0 comments

Comments

@tikoflano
Copy link

tikoflano commented Jul 28, 2020

If you have multiple enity managers it uses the default one, any way to select which one to use or to use them all?

Right now the only way I'm aware of is to change the default Entity Manager or to override the services definitions:

services:
    ambta_doctrine_encrypt.command.decrypt.database:
        class: Ambta\DoctrineEncryptBundle\Command\DoctrineDecryptDatabaseCommand
        tags: ['console.command']
        arguments:
            - "@doctrine.orm.custom_entity_manager"
            - "@annotation_reader"
            - "@ambta_doctrine_encrypt.subscriber"

    ambta_doctrine_encrypt.command.encrypt.database:
        class: Ambta\DoctrineEncryptBundle\Command\DoctrineEncryptDatabaseCommand
        tags: ['console.command']
        arguments:
            - "@doctrine.orm.custom_entity_manager"
            - "@annotation_reader"
            - "@ambta_doctrine_encrypt.subscriber"

    ambta_doctrine_encrypt.command.encrypt.status:
        class: Ambta\DoctrineEncryptBundle\Command\DoctrineEncryptStatusCommand
        tags: ['console.command']
        arguments:
            - "@doctrine.orm.custom_entity_manager"
            - "@annotation_reader"
            - "@ambta_doctrine_encrypt.subscriber"

Maybe on the bundle's configuration you might be able to specify the entity manager (and default to the default entity manger if it is not set)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant