diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php index 6763aad83b..bfcab8b53f 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php @@ -1187,23 +1187,7 @@ protected function addTableDefaults(&$schema) { * A partial schema array for the base table. */ protected function processBaseTable(ContentEntityTypeInterface $entity_type, array &$schema) { - // Account for a missing ID key. In theory this should not be necessary, but - // we support this for backwards-compatibility. Entity types can be declared - // without an ID field (and, thus, also without an ID key) if they are not - // stored (for example if they use ContentEntityNullStorage as the storage - // handler). Contact messages are an example of this. We then support other - // modules adding an ID field, for example via - // hook_entity_base_field_info(). Such a module is responsible for adding - // ID key to the entity type in its hook_install() implementation. (See - // Contact Storage Test for an example of this.) The ID field, however, will - // already have been installed at this point by the module installer itself. - // And because the last installed entity type is used when building the - // entity schema during field installation the entity type will not (yet) - // have an ID key when the ID field is being installed. - // @todo Remove this in https://www.drupal.org/project/drupal/issues/2929120 - if ($entity_type->hasKey('id')) { - $this->processIdentifierSchema($schema, $entity_type->getKey('id')); - } + $this->processIdentifierSchema($schema, $entity_type->getKey('id')); } /**