DDC-3579: Allow override of inversedBy #4399

Closed
opened 2026-01-22 14:40:59 +01:00 by admin · 1 comment
Owner

Originally created by @doctrinebot on GitHub (Feb 20, 2015).

Jira issue originally created by user z38:

If an entity inherits a many-to-many relationship it is sometimes desirable to be allowed to override inversedBy. This way bi-directional relationships can exist without code duplication. For examples, check out this and this Stackoverflow question.

The proposed pull-request implements this feature. I'm open to any comments and suggestions. Please just let me know if this feature is opposed to any concepts/practices, I'm not sure whether the feature is needed by anyone else.

Originally created by @doctrinebot on GitHub (Feb 20, 2015). Jira issue originally created by user z38: If an entity inherits a many-to-many relationship it is sometimes desirable to be allowed to override `inversedBy`. This way bi-directional relationships can exist without code duplication. For examples, check out [this](http://stackoverflow.com/questions/13832517/doctrine2-mapping-overwrite-inherited-inversedby-field-from-mappedsuperclass) and [this](http://stackoverflow.com/questions/22745653/overriding-inversedby-mapping-in-doctrine-2-inheritance) Stackoverflow question. The proposed pull-request implements this feature. I'm open to any comments and suggestions. Please just let me know if this feature is opposed to any concepts/practices, I'm not sure whether the feature is needed by anyone else.
admin added the New Feature label 2026-01-22 14:40:59 +01:00
admin closed this issue 2026-01-22 14:40:59 +01:00
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#4399