Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1705

BasicEntityPersister throws error undefined index

    Details

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

      Description

      In the BasicEntityPersister in the _getInsertSQL function when you are foreaching the columns you make a check

      if (isset($this->_columnTypes[$column]) &&
                              isset($this->_class->fieldMappings[$this->_class->fieldNames[$column]]['requireSQLConversion'])) {
                              $type = Type::getType($this->_columnTypes[$column]);
                              $placeholder = $type->convertToDatabaseValueSQL('?', $this->_platform);
                          }
      

      the problem is in

        isset($this->_class->fieldMappings[$this->_class->fieldNames[$column]]['requireSQLConversion'])
      

      because you are not checking if it is set

      $this->_class->fieldNames[$column]
      

      i got that problem when was saving ManyToOne association

        Activity

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            victor Velkov
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: