DDC-3719: Criteria won't work on non-owning side of many to many collection #4566

Closed
opened 2026-01-22 14:45:00 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Apr 29, 2015).

Originally assigned to: @guilhermeblanco on GitHub.

Jira issue originally created by user baileylo:

I received the following error when trying to call matching on a ManyToMany relationship from the non-owning side.

{quote}
ErrorException in ManyToManyPersister.php line 234: Undefined index: relationToSourceKeyColumns
{quote}

ManyToManyPersister::loadCriteria relies on the relationToSourceKeyColumns data from the mapping data. This value is set in ClassMetadataInfo::_validateAndCompleteManyToManyMapping, but it's only set on the owning side of the relationship.

Originally created by @doctrinebot on GitHub (Apr 29, 2015). Originally assigned to: @guilhermeblanco on GitHub. Jira issue originally created by user baileylo: I received the following error when trying to call _matching_ on a ManyToMany relationship from the non-owning side. {quote} ErrorException in ManyToManyPersister.php line 234: Undefined index: relationToSourceKeyColumns {quote} _ManyToManyPersister::loadCriteria_ relies on the _relationToSourceKeyColumns_ data from the mapping data. This value is set in ClassMetadataInfo::_validateAndCompleteManyToManyMapping, but it's only set on the owning side of the relationship.
admin added the Bug label 2026-01-22 14:45:00 +01:00
admin closed this issue 2026-01-22 14:45:00 +01:00
Author
Owner

@doctrinebot commented on GitHub (Apr 29, 2015):

@doctrinebot commented on GitHub (Apr 29, 2015): - is referenced by [DDC-3723: [GH-1399] Fix for DDC-3719.](http://www.doctrine-project.org/jira/browse/DDC-3723)
Author
Owner

@boesing commented on GitHub (Jan 5, 2017):

Since PR #5638 was merged, when will this fix merged into 2.5 branch or will this be part of 2.6?
I am expiriencing this aswell and would love to use this fix.

Never mind, got the milestone 2.6, even if I am wondering why bugfixes are not merged into current branches.

@boesing commented on GitHub (Jan 5, 2017): Since PR #5638 was merged, when will this fix merged into 2.5 branch or will this be part of 2.6? I am expiriencing this aswell and would love to use this fix. Never mind, got the milestone 2.6, even if I am wondering why bugfixes are not merged into current branches.
Author
Owner

@Ocramius commented on GitHub (Jan 5, 2017):

@boesing it's up to the merger to decide whether a fix is worth backporting or not.

@Ocramius commented on GitHub (Jan 5, 2017): @boesing it's up to the merger to decide whether a fix is worth backporting or not.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4566