DDC-4021: Overriding inversedBy in inheriting class #4904

Closed
opened 2026-01-22 14:51:48 +01:00 by admin · 4 comments
Owner

Originally created by @doctrinebot on GitHub (Nov 30, 2015).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user kai.eichinger:

The documentation at http://doctrine-orm.readthedocs.org/projects/doctrine-orm/en/latest/reference/inheritance-mapping.html#association-override mentions the following feature:

bq. - The override could redefine inversedBy to reference more than one extended entity.

Unfortunately, I've been unable to figure out how to do so since AssociationOverride doesn't accept ManyToMany or ManyToOne parameters, only joinColumns and joinTable.

So I've been wondering whether the statement made is outdated, invalid or just about an upcoming feature. If I'm clearly missing something here I'd love to get a nudge in the right direction where to find an example on how to incorporate this feature.

Cheers~

Originally created by @doctrinebot on GitHub (Nov 30, 2015). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user kai.eichinger: The documentation at http://doctrine-orm.readthedocs.org/projects/doctrine-orm/en/latest/reference/inheritance-mapping.html#association-override mentions the following feature: bq. - The override could redefine inversedBy to reference more than one extended entity. Unfortunately, I've been unable to figure out how to do so since `AssociationOverride` doesn't accept `ManyToMany` or `ManyToOne` parameters, only `joinColumns` and `joinTable`. So I've been wondering whether the statement made is outdated, invalid or just about an upcoming feature. If I'm clearly missing something here I'd love to get a nudge in the right direction where to find an example on how to incorporate this feature. Cheers~
admin added the Bug label 2026-01-22 14:51:48 +01:00
admin closed this issue 2026-01-22 14:51:48 +01:00
Author
Owner

@JustBlackBird commented on GitHub (Jan 27, 2017):

Just interested: any progress of this? The docs is very misleading about inversedBy field right now.

@JustBlackBird commented on GitHub (Jan 27, 2017): Just interested: any progress of this? The docs is very misleading about `inversedBy` field right now.
Author
Owner

@alex-pex commented on GitHub (Feb 22, 2017):

Bump!

The code exists: https://github.com/doctrine/doctrine2/commit/ff28507b88ffd98830c44762
The documentation mention it, as stated. Even the phpdoc has reference to it: http://doctrine-project.org/api/orm/2.5/source-class-Doctrine.ORM.Mapping.AssociationOverride.html

On the 2.5 the commit is not there. Why?

@alex-pex commented on GitHub (Feb 22, 2017): Bump! The code exists: https://github.com/doctrine/doctrine2/commit/ff28507b88ffd98830c44762 The documentation mention it, as stated. Even the phpdoc has reference to it: http://doctrine-project.org/api/orm/2.5/source-class-Doctrine.ORM.Mapping.AssociationOverride.html On the 2.5 the commit is not there. Why?
Author
Owner

@Ocramius commented on GitHub (Feb 22, 2017):

@alex-pex probably landed in 2.6-DEV only

@Ocramius commented on GitHub (Feb 22, 2017): @alex-pex probably landed in `2.6-DEV` only
Author
Owner

@Majkl578 commented on GitHub (Sep 11, 2017):

This is fixed by #1308 and should land in 2.6.

@Majkl578 commented on GitHub (Sep 11, 2017): This is fixed by #1308 and should land in 2.6.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4904