[DDC-1885] Problem with column quoting on Delete Created: 20/Jun/12 Updated: 04/Jul/12 Resolved: 04/Jul/12 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.1.6 |
| Fix Version/s: | 2.3 |
| Security Level: | All |
| Type: | Bug | Priority: | Major |
| Reporter: | Ignacio Larranaga | Assignee: | Fabio B. Silva |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
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; } |
| Comments |
| Comment by Fabio B. Silva [ 20/Jun/12 ] |
|
code format |
| Comment by Fabio B. Silva [ 20/Jun/12 ] |
|
Hi Ignacio, I think it will be fixed by : Anyway could you attach a test case for this one please ? |
| Comment by Ignacio Larranaga [ 25/Jun/12 ] |
|
Hi Fabio, sorry I doesn't have a test case written |
| Comment by Fabio B. Silva [ 25/Jun/12 ] |
|
Hi Ignacio, No problem, could you attach your entities ? Thanks |
| Comment by Ignacio Larranaga [ 25/Jun/12 ] |
|
User and Role, and I was just adding a role and updateing. |
| Comment by Fabio B. Silva [ 26/Jun/12 ] |
|
Thanks Ignacio, I'm working on this problem. |
| Comment by Fabio B. Silva [ 04/Jul/12 ] |
|
Fixed by : https://github.com/doctrine/doctrine2/commit/4bfdcd32f7548c628fc393e36bf37ef8b97a80a8 |