DiscriminatorColumn constructor is missing fieldName? #6743

Closed
opened 2026-01-22 15:37:51 +01:00 by admin · 3 comments
Owner

Originally created by @Webonaute on GitHub (Jun 2, 2021).

DiscriminatorColumn constructor is missing fieldName?

 * @ORM\DiscriminatorColumn(name="type", type="string", length=255, fieldName="type")

produce error like:

In AnnotationException.php line 52:
                                                                               
  [Creation Error] The annotation @ORM\DiscriminatorColumn declared on class   
  App\Entity\Tier\Rule\Rule does not have a property named "fieldName"         
  that can be set through its named arguments constructor.                     
  Available named arguments: name, type, length, columnDefinition              
Originally created by @Webonaute on GitHub (Jun 2, 2021). DiscriminatorColumn constructor is missing fieldName? ``` * @ORM\DiscriminatorColumn(name="type", type="string", length=255, fieldName="type") ``` produce error like: ``` In AnnotationException.php line 52: [Creation Error] The annotation @ORM\DiscriminatorColumn declared on class App\Entity\Tier\Rule\Rule does not have a property named "fieldName" that can be set through its named arguments constructor. Available named arguments: name, type, length, columnDefinition ```
admin closed this issue 2026-01-22 15:37:51 +01:00
Author
Owner

@beberlei commented on GitHub (Jun 2, 2021):

This field is not used in code: https://github.com/doctrine/orm/blob/2.9.x/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php#L299 - you should remove it and we should remove this field.

@beberlei commented on GitHub (Jun 2, 2021): This field is not used in code: https://github.com/doctrine/orm/blob/2.9.x/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php#L299 - you should remove it and we should remove this field.
Author
Owner

@Webonaute commented on GitHub (Jun 2, 2021):

Why closing this straight away. its a BC between 2.8.4 and 2.9.2.

We used this fieldName since ages and now broking our code. why that change? why no deprecation warning?

@Webonaute commented on GitHub (Jun 2, 2021): Why closing this straight away. its a BC between 2.8.4 and 2.9.2. We used this fieldName since ages and now broking our code. why that change? why no deprecation warning?
Author
Owner

@beberlei commented on GitHub (Jun 3, 2021):

@Webonaute what are you using it for? It has no functionality from looking at the code.

@beberlei commented on GitHub (Jun 3, 2021): @Webonaute what are you using it for? It has no functionality from looking at the code.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6743