DDC-1885: Problem with column quoting on Delete #2378

Closed
opened 2026-01-22 13:51:07 +01:00 by admin · 9 comments
Owner

Originally created by @doctrinebot on GitHub (Jun 20, 2012).

Jira issue originally created by user ignaciolarranaga:

delete($entity) from BasicEntityPersiter is not considering that the columns might be quoted.

public function delete($entity) {
    $identifier = $this->_em->getUnitOfWork()->getEntityIdentifier($entity);
        $this->deleteJoinTableRecords($identifier);

        $id = array*combine($this->*class->getIdentifierColumnNames(), $identifier);
        $this->*conn->delete($this->_class->getQuotedTableName($this->*platform), $id);
}

The third line:

        $id = array*combine($this->*class->getIdentifierColumnNames(), $identifier);
        // might be fixed in this way (as example):
        foreach ($identifier as $columnName => $value) {
                $id[$this->*class->getQuotedColumnName($columnName, $this->*platform)] = $value;
        }
Originally created by @doctrinebot on GitHub (Jun 20, 2012). Jira issue originally created by user ignaciolarranaga: delete($entity) from BasicEntityPersiter is not considering that the columns might be quoted. ``` public function delete($entity) { $identifier = $this->_em->getUnitOfWork()->getEntityIdentifier($entity); $this->deleteJoinTableRecords($identifier); $id = array*combine($this->*class->getIdentifierColumnNames(), $identifier); $this->*conn->delete($this->_class->getQuotedTableName($this->*platform), $id); } ``` The third line: ``` $id = array*combine($this->*class->getIdentifierColumnNames(), $identifier); // might be fixed in this way (as example): foreach ($identifier as $columnName => $value) { $id[$this->*class->getQuotedColumnName($columnName, $this->*platform)] = $value; } ```
admin added the Bug label 2026-01-22 13:51:07 +01:00
admin closed this issue 2026-01-22 13:51:08 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jun 20, 2012):

Comment created by @FabioBatSilva:

code format

@doctrinebot commented on GitHub (Jun 20, 2012): Comment created by @FabioBatSilva: code format
Author
Owner

@doctrinebot commented on GitHub (Jun 20, 2012):

Comment created by @FabioBatSilva:

Hi Ignacio,

I think it will be fixed by :
https://github.com/doctrine/doctrine2/pull/372

Anyway could you attach a test case for this one please ?

@doctrinebot commented on GitHub (Jun 20, 2012): Comment created by @FabioBatSilva: Hi Ignacio, I think it will be fixed by : https://github.com/doctrine/doctrine2/pull/372 Anyway could you attach a test case for this one please ?
Author
Owner

@doctrinebot commented on GitHub (Jun 25, 2012):

Comment created by ignaciolarranaga:

Hi Fabio, sorry I doesn't have a test case written :(

@doctrinebot commented on GitHub (Jun 25, 2012): Comment created by ignaciolarranaga: Hi Fabio, sorry I doesn't have a test case written :(
Author
Owner

@doctrinebot commented on GitHub (Jun 25, 2012):

Comment created by @FabioBatSilva:

Hi Ignacio,

No problem, could you attach your entities ?

Thanks

@doctrinebot commented on GitHub (Jun 25, 2012): Comment created by @FabioBatSilva: Hi Ignacio, No problem, could you attach your entities ? Thanks
Author
Owner

@doctrinebot commented on GitHub (Jun 25, 2012):

Comment created by ignaciolarranaga:

User and Role, and I was just adding a role and updateing.
The database is PostgresSQL.

@doctrinebot commented on GitHub (Jun 25, 2012): Comment created by ignaciolarranaga: User and Role, and I was just adding a role and updateing. The database is PostgresSQL.
Author
Owner

@doctrinebot commented on GitHub (Jun 26, 2012):

Comment created by @FabioBatSilva:

Thanks Ignacio,

I'm working on this problem.

@doctrinebot commented on GitHub (Jun 26, 2012): Comment created by @FabioBatSilva: Thanks Ignacio, I'm working on this problem.
Author
Owner

@doctrinebot commented on GitHub (Jul 4, 2012):

Comment created by @FabioBatSilva:

Fixed by : 4bfdcd32f7

@doctrinebot commented on GitHub (Jul 4, 2012): Comment created by @FabioBatSilva: Fixed by : https://github.com/doctrine/doctrine2/commit/4bfdcd32f7548c628fc393e36bf37ef8b97a80a8
Author
Owner

@doctrinebot commented on GitHub (Jul 4, 2012):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Jul 4, 2012): Issue was closed with resolution "Fixed"
Author
Owner

@doctrinebot commented on GitHub (Dec 13, 2015):

Imported 2 attachments from Jira into https://gist.github.com/1b32839aeca8cad7270f

@doctrinebot commented on GitHub (Dec 13, 2015): Imported 2 attachments from Jira into https://gist.github.com/1b32839aeca8cad7270f - [11200_User.php](https://gist.github.com/1b32839aeca8cad7270f#file-11200_User-php) - [11201_Role.php](https://gist.github.com/1b32839aeca8cad7270f#file-11201_Role-php)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2378