-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Resolving target entities from abstract class seems to not working as expected #7670
Comments
@emulienfou I've moved the issue to the ORM repository as the bundle only configures the class contained here with the data you pass in the configuration. I would assume there's an issue with the logic here. |
Can this be reproduced solely with the |
Could be the same as: doctrine/common#369 (doctrine/persistence#27) |
Described this problem in test project: And temporary workaround: |
Sorry, it’s not related as I initially thought |
Hello, according to the How to Define Relationships with Abstract Classes and Interfaces, I should be able to use the
ResolveTargetEntityListener
to resolve an abstract class to a specific entity.However, this "feature" seems to not working properly.
1. Using an interface
Here is the PHP code used to resolve the interface to the entity class;
When configuring doctrine using an interface like:
everything is working perfectly and the name is equals to
App\Entity\RedirectRoute
2. Using an abstract class
Now when I'm trying to resolve an entity from an abstract class, the resolver seems to not working properly.
Here is the PHP code used to resolve the abstract class to the entity class:
When configuring doctrine using an abstract class like:
In that case, the resolver is returning the abstract class FQCN:
App\Model\AbstractRedirectRoute
.Weird thing is, to be able to resolve the abstract class I need to make the call to
getAllMetadata()
method like:In that case, the entity is resolved correctly!
Is this an issue or more a miss-configuration on my side?
The text was updated successfully, but these errors were encountered: