diff --git a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php index 9f0585e..b64c5e8 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php @@ -382,15 +382,8 @@ protected function processFields($field_names) { $mapping = array(); foreach ($field_names as $field_name) { $columns = isset($this->fieldDefinitions[$field_name]) ? array_keys($this->fieldDefinitions[$field_name]->getColumns()) : array(); - // @todo Remove the entity reference check once we can handle schema - // changes or the Entity reference module stops messing with field - // schema. See: - // - https://drupal.org/node/1498720 - // - https://drupal.org/node/2209981 foreach ($columns as $index => $column) { - if (!$index || $this->fieldDefinitions[$field_name]->getType() != 'entity_reference') { - $mapping[$field_name][] = $this->schemaHandler()->getFieldColumnName($this->fieldDefinitions[$field_name], $column); - } + $mapping[$field_name][] = $this->schemaHandler()->getFieldColumnName($this->fieldDefinitions[$field_name], $column); } } return $mapping; diff --git a/core/lib/Drupal/Core/Entity/Schema/ContentEntitySchemaHandler.php b/core/lib/Drupal/Core/Entity/Schema/ContentEntitySchemaHandler.php index bd96c6c..8bd7e6e 100644 --- a/core/lib/Drupal/Core/Entity/Schema/ContentEntitySchemaHandler.php +++ b/core/lib/Drupal/Core/Entity/Schema/ContentEntitySchemaHandler.php @@ -152,17 +152,7 @@ protected function addFieldSchema(array &$schema, $field_name) { $index = 0; foreach ($field_schema['columns'] as $column_name => $column_schema) { - // @todo Remove the entity reference check once we can handle schema - // changes or the Entity reference module stops messing with field - // schema. See: - // - https://drupal.org/node/1498720 - // - https://drupal.org/node/2209981 - if ($definition->getType() == 'entity_reference' && $index++ > 0) { - continue; - } - else { - $schema_field_name = $this->getFieldColumnName($definition, $column_name); - } + $schema_field_name = $this->getFieldColumnName($definition, $column_name); $schema['fields'][$schema_field_name] = $column_schema; $schema['fields'][$schema_field_name]['description'] = $definition->getDescription();