mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DiscriminatorColumn fieldName is not set in AnnotationDriver #5909
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Zayon on GitHub (Mar 2, 2018).
In branch 2.6
Given I have an Entity :
Then I have :
Fix is :
In https://github.com/doctrine/doctrine2/blob/2.6/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php#L253
PR incoming
Edit :
We only accept PRs to "master"well PR not incoming then. 😢@Ocramius commented on GitHub (Mar 2, 2018):
Note that a discriminator has no real
fieldName- should probably noteven exist...
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/
On Fri, Mar 2, 2018 at 11:36 AM, Pablo Godinez notifications@github.com
wrote:
@Zayon commented on GitHub (Mar 5, 2018):
Well what I want to accomplish is to have a single repository that can return any of inherited class.
like this:
Anyway
DiscriminatorColumnshould either have afieldNameproperty correctly set or nofieldNameproperty at all.@Ocramius commented on GitHub (Mar 5, 2018):
This won't work by design, because the discriminator is NOT a field. The fact that it has a field in the metadata is a different story, and IMO the
fieldNameshould not exist at all there.@guilhermeblanco maybe this is already fixed in
master?@guilhermeblanco commented on GitHub (Mar 5, 2018):
IIRC, I dropped the
fieldNamefrom DiscriminatorColumn already in master.@beberlei commented on GitHub (Dec 7, 2020):
This seems to be dead code that was never used in 2.x