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

        victor Velkov created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.2.2 [ 10195 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 13529 ] jira-feedback [ 15277 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 15277 ] jira-feedback2 [ 17141 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17141 ] jira-feedback3 [ 19394 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: