[PR #6992] Fix #6991: correctly resolve identifer values in ManyToManyPersister #10258

Closed
opened 2026-01-22 16:06:58 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/6992

State: closed
Merged: No


This is due to a typo in \Doctrine\ORM\Persisters\Collection\ManyToManyPersister::getDeleteSQLParameters:

        foreach ($mapping['relationToSourceKeyColumns'] as $columnName => $refColumnName) {
            $params[] = isset($sourceClass->fieldNames[$refColumnName])
                ? $identifier[$sourceClass->fieldNames[$refColumnName]]
                : $identifier[$sourceClass->getFieldForColumn($columnName)];
        }

It should be $sourceClass->getFieldForColumn($refColumnName), as $columnName is the join table column, not the entity table column.

**Original Pull Request:** https://github.com/doctrine/orm/pull/6992 **State:** closed **Merged:** No --- This is due to a typo in `\Doctrine\ORM\Persisters\Collection\ManyToManyPersister::getDeleteSQLParameters`: ``` foreach ($mapping['relationToSourceKeyColumns'] as $columnName => $refColumnName) { $params[] = isset($sourceClass->fieldNames[$refColumnName]) ? $identifier[$sourceClass->fieldNames[$refColumnName]] : $identifier[$sourceClass->getFieldForColumn($columnName)]; } ``` It should be `$sourceClass->getFieldForColumn($refColumnName)`, as `$columnName` is the join table column, not the entity table column.
admin added the pull-request label 2026-01-22 16:06:58 +01:00
admin closed this issue 2026-01-22 16:06:59 +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#10258