diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php index 0d4f6ed..cdfee9a 100644 --- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php +++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php @@ -1639,10 +1639,10 @@ protected function getSharedTableFieldSchema(FieldStorageDefinitionInterface $st // Process the 'id' and 'revision' entity keys for the base and revision // tables. - if ($field_name == $this->storage->getEntityType()->getKey('id') && $table_name == $this->storage->getBaseTable()) { + if ($field_name == $this->entityType->getKey('id') && $table_name == $this->storage->getBaseTable()) { $this->processIdentifierSchema($schema, $this->entityType->getKey('id')); } - if ($field_name == $this->storage->getEntityType()->getKey('revision') && $table_name == $this->storage->getRevisionTable()) { + if ($field_name == $this->entityType->getKey('revision') && $table_name == $this->storage->getRevisionTable()) { $this->processIdentifierSchema($schema, $this->entityType->getKey('revision')); } diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php index 1ce87c5..ea8f081 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php @@ -397,7 +397,7 @@ public function testGetSchemaRevisionable() { ), )); - $this->storage->expects($this->exactly(2)) + $this->storage->expects($this->exactly(6)) ->method('getRevisionTable') ->will($this->returnValue('entity_test_revision')); @@ -604,7 +604,7 @@ public function testGetSchemaRevisionableTranslatable() { ), )); - $this->storage->expects($this->exactly(3)) + $this->storage->expects($this->exactly(11)) ->method('getRevisionTable') ->will($this->returnValue('entity_test_revision')); $this->storage->expects($this->once())