Skip to content

DDC-1705: BasicEntityPersister throws error undefined index #2354

Closed
@doctrinebot

Description

@doctrinebot

Jira issue originally created by user vigor_bg:

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions