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

Open
opened 2026-01-22 14:44:58 +01:00 by admin · 0 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:44:58 +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#4564