Unverified Commit 2ecc2ee7 authored by alexpott's avatar alexpott

Issue #3027574 by tuutti: SqlContentEntityStorage no longer update entities...

Issue #3027574 by tuutti: SqlContentEntityStorage no longer update entities with certain (id) fields

(cherry picked from commit 819a788e)
parent da56eaa0
......@@ -821,13 +821,14 @@ protected function doSaveFieldItems(ContentEntityInterface $entity, array $names
if ($update) {
$default_revision = $entity->isDefaultRevision();
if ($default_revision) {
$id = $record->{$this->idKey};
// Remove the ID from the record to enable updates on SQL variants
// that prevent updating serial columns, for example, mssql.
unset($record->{$this->idKey});
$this->database
->update($this->baseTable)
->fields((array) $record)
->condition($this->idKey, $entity->get($this->idKey)->value)
->condition($this->idKey, $id)
->execute();
}
if ($this->revisionTable) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment