DDC-2311: ManyToManyPersister fails to delete when entity uses FK ID #2902

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

Originally created by @doctrinebot on GitHub (Feb 21, 2013).

Jira issue originally created by user chrisrichard:

ManyToManyPersister::getDeleteSQLParameters assumes $srcColumn contains a field name; doesn't handle association case.

ManyToManyPerister.php, lines 204-209:

// Composite identifier
$sourceClass = $this->_em->getClassMetadata($mapping['sourceEntity']);
foreach ($mapping['relationToSourceKeyColumns'] as $relColumn => $srcColumn) {
   $params[] = $identifier[$sourceClass->fieldNames[$srcColumn]];
}
Originally created by @doctrinebot on GitHub (Feb 21, 2013). Jira issue originally created by user chrisrichard: ManyToManyPersister::getDeleteSQLParameters assumes $srcColumn contains a field name; doesn't handle association case. ManyToManyPerister.php, lines 204-209: ``` // Composite identifier $sourceClass = $this->_em->getClassMetadata($mapping['sourceEntity']); foreach ($mapping['relationToSourceKeyColumns'] as $relColumn => $srcColumn) { $params[] = $identifier[$sourceClass->fieldNames[$srcColumn]]; } ```
admin added the Bug label 2026-01-22 14:06:59 +01:00
admin closed this issue 2026-01-22 14:07:00 +01:00
Author
Owner

@doctrinebot commented on GitHub (Feb 21, 2013):

Comment created by @FabioBatSilva:

Hi Chris,

Could you try to add a failing test case please ?

Cheers.

@doctrinebot commented on GitHub (Feb 21, 2013): Comment created by @FabioBatSilva: Hi Chris, Could you try to add a failing test case please ? Cheers.
Author
Owner

@doctrinebot commented on GitHub (Apr 16, 2013):

Comment created by @FabioBatSilva:

Fixed by : cef20890dc

@doctrinebot commented on GitHub (Apr 16, 2013): Comment created by @FabioBatSilva: Fixed by : https://github.com/doctrine/doctrine2/commit/cef20890dc75c11880827226e25f3fc6d5d66127
Author
Owner

@doctrinebot commented on GitHub (Apr 16, 2013):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Apr 16, 2013): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2902