Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1885

Problem with column quoting on Delete

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.6
    • Fix Version/s: 2.3
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      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;
              }
      
      1. Role.php
        2 kB
        Ignacio Larranaga
      2. User.php
        4 kB
        Ignacio Larranaga

        Activity

          People

          • Assignee:
            Fabio B. Silva
            Reporter:
            Ignacio Larranaga
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: