Closed teohhanhui closed 6 years ago
That would be really great!
Some discussion about this is in #8.
Copying my comment from the PR discussion:
Besides the point #1 from my comment here, if you're in need of this extension, you shouldn't call $em->getRepository()
, but inject the specific EntityRepository (or a child class) in your class directly via dependency injection, as @Ocramius said.
BTW: I'm not a fan of extending EntityRepository at all. It encourages huge god objects with many methods because of 1:1 mapping between repositories and entities. I like much more specific repositories for specific use-cases of an entity. For example one repository for getting translations, another repository for tree manipulation etc.
So I reserve my right to be opinionated and close this PR.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.