1
0
mirror of synced 2025-02-02 21:41:45 +03:00

Merge pull request #6011 from lcobucci/refactor/use-method-instead

Use `ClassMedatada#isIdGeneratorIdentity()` instead of constant to add the ID on query
This commit is contained in:
Guilherme Blanco 2016-09-09 10:25:00 -04:00 committed by GitHub
commit 81f4d3b0fb

View File

@ -1442,7 +1442,7 @@ class BasicEntityPersister implements EntityPersister
continue;
}
if ($this->class->generatorType != ClassMetadata::GENERATOR_TYPE_IDENTITY || $this->class->identifier[0] != $name) {
if (! $this->class->isIdGeneratorIdentity() || $this->class->identifier[0] != $name) {
$columns[] = $this->quoteStrategy->getColumnName($name, $this->class, $this->platform);
$this->columnTypes[$name] = $this->class->fieldMappings[$name]['type'];
}