Use isIdGeneratorIdentity()
to add the ID on query
It's quite handy when creating CUSTOM id generators that should also rely on AUTO_INCREMENT stuff (one can just extend the `ClassMedatadaFactory` and create a different instance of `ClassMetadata` that overrides that method).
This commit is contained in:
parent
e7e142ea4a
commit
e43b9e9e3a
@ -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'];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user