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

Repository made by factory method @doctrine.orm.default_entity_manager::getRepository($entityName) always have different EntityManager #874

Closed
fernetmatt opened this issue Nov 1, 2018 · 4 comments

Comments

@fernetmatt
Copy link

Every repository i configure in my yaml conf file, using the factory method getRepository() of @doctrine.orm.default_entity_manager get a differente instance of EntityManager causing impossibility to save Entity with mapping associations

I really can't understand why using factory: ["@doctrine.orm.default_entity_manager", getRepository] generate inconsistent EntityManager instances across the repositories while using factory: ["@doctrine.orm.container_repository_factory", getRepository] have better stability.

TL;DR this story is very long, please go to my SO question here STACKOVERFLOW

PHP 7.2.7
| Version | v2.6.1
| Version | v2.6.2

@Ocramius
Copy link
Member

Ocramius commented Nov 4, 2018

Closing as invalid: not related to this repository.

@Ocramius Ocramius closed this as completed Nov 4, 2018
@Ocramius Ocramius self-assigned this Nov 4, 2018
@Majkl578
Copy link
Contributor

Majkl578 commented Nov 4, 2018

Actually let's use this new GH feature and move it to appropriate repository. 😊

@Majkl578 Majkl578 reopened this Nov 4, 2018
@Majkl578 Majkl578 transferred this issue from doctrine/orm Nov 4, 2018
@xabbuh
Copy link
Member

xabbuh commented Nov 5, 2018

I think this is the same as symfony/symfony#28869.

@alcaeus
Copy link
Member

alcaeus commented Apr 6, 2019

Looking at the issue @xabbuh linked as well as symfony/symfony#30091 and symfony/symfony#30096, I'd agree that this is not caused by the bundle but rather by the container. Closing here as there's nothing we can fix.

@alcaeus alcaeus closed this as completed Apr 6, 2019
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

5 participants