mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #6151] Embeddable attribute override support #9867
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?
Original Pull Request: https://github.com/doctrine/orm/pull/6151
State: closed
Merged: No
This allows for overriding of embeddable mapping definitions from the parent entity/embeddable.
Nested embeddables are supported via dot notation along with the ability to drop column(s) from the embedded object if necessary.
The syntax is equivalent to attribute overrides on a subclass with the addition of passing a
nullvalue for a overridden column to drop it from the parent's field mappings.Via annotations:
Via XML:
Via YML:
A further improvement could be to merge the column override over the top of the original column instead of replacing it. Doing so would remove the need to redefine original column attributes even if they have not been changed. This change is outside the scope of this pull request.
References #6047