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

doctrine:schema:update --complete not working with multiple entity manager using same connection #1684

Closed
acantepie opened this issue Jul 14, 2023 · 1 comment

Comments

@acantepie
Copy link

acantepie commented Jul 14, 2023

According to documentation it's possible to declare multiple manager using same connection like this :

doctrine:
    orm:
        default_entity_manager: default
        entity_managers:
            default:
                connection: default
                mappings:
                    App:
                        is_bundle: false
                        dir: '%kernel.project_dir%/src/Entity'
                        prefix: 'App\Entity'
                        alias: App
                        type: attribute
            foo:
                connection: default
                mappings:
                    Foo:
                        is_bundle: false
                        dir: '%kernel.project_dir%/src/Foo'
                        prefix: 'App\Foo'
                        type: attribute

If you doing that,
bin/console doctrine:schema:update --force --complete --em=default will sync schema of manager "default" and drop schema of manager "foo"

bin/console doctrine:schema:update --force --complete --em=foo will sync schema of manager "foo" and drop schema of manager "default"

@ostrolucky
Copy link
Member

This is how --complete is designed to work. If you don't want this behaviour, you can still use the command without --complete for now, but it has been deprecated at doctrine/orm#10153. Nothing this bundle can do about, unfortunately.

@ostrolucky ostrolucky closed this as not planned Won't fix, can't repro, duplicate, stale Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants