[PR #11135] Keep the declared mapping information when using attribute overrides #12815

Open
opened 2026-01-22 16:15:15 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/11135

State: closed
Merged: Yes


When using AttributeOverride to override mapping information inherited from a parent class (a mapped superclass), make sure to keep information about where the field was originally declared.

This is important for private fields: Without the correct declared information, it will lead to errors when cached mapping information is loaded, reflection wakes up and looks for the private field in the wrong class.

**Original Pull Request:** https://github.com/doctrine/orm/pull/11135 **State:** closed **Merged:** Yes --- When using `AttributeOverride` to override mapping information inherited from a parent class (a mapped superclass), make sure to keep information about where the field was originally declared. This is important for `private` fields: Without the correct `declared` information, it will lead to errors when cached mapping information is loaded, reflection wakes up and looks for the private field in the wrong class.
admin added the pull-request label 2026-01-22 16:15:15 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#12815