diff --git a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php index 3d0cd80..cc27e23 100644 --- a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php +++ b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php @@ -135,8 +135,8 @@ public function __construct($entityType) { } // Check if the entity type has a dedicated table for properties. - if (!empty($this->entityInfo['data table'])) { - $this->dataTable = $this->entityInfo['data table']; + if (!empty($this->entityInfo['data_table'])) { + $this->dataTable = $this->entityInfo['data_table']; } // Check if the entity type supports revisions. @@ -361,10 +361,10 @@ protected function buildQuery($ids, $revision_id = FALSE) { $query->addExpression('base.' . $this->revisionKey . ' = revision.' . $this->revisionKey, 'isDefaultRevision'); } - // Add fields from the entity data table. + // Add fields from the entity data_table. if (!empty($this->dataTable)) { // Add all fields from the {entity_data} table. - $entity_data_fields = drupal_map_assoc($this->entityInfo['schema_fields_sql']['data table']); + $entity_data_fields = drupal_map_assoc($this->entityInfo['schema_fields_sql']['data_table']); // The id field is provided by entity, so remove it. unset($entity_data_fields[$this->idKey]); @@ -662,7 +662,7 @@ protected function postSave(EntityInterface $entity, $update) { // Write the data into the property data table if one is available. if ($this->dataTable) { // @todo try to find a better way to deal with updates. - $query = db_select($this->entityInfo['data table']) + $query = db_select($this->entityInfo['data_table']) ->condition($this->idKey, $entity->id()) ->condition('langcode', $entity->langcode); $query->addExpression('1'); @@ -672,11 +672,11 @@ protected function postSave(EntityInterface $entity, $update) { $this->idKey, 'langcode', ); - drupal_write_record($this->entityInfo['data table'], $entity, $primary_keys); + drupal_write_record($this->entityInfo['data_table'], $entity, $primary_keys); } else { // Insert new property data row. - drupal_write_record($this->entityInfo['data table'], $entity); + drupal_write_record($this->entityInfo['data_table'], $entity); } } } diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index d477dec..6fa7ae9 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -270,8 +270,8 @@ protected function processDefinition(&$definition, $plugin_id) { // Drupal\Core\Entity\DatabaseStorageControllerInterface::buildQuery(). if (isset($definition['base_table'])) { $definition['schema_fields_sql']['base_table'] = drupal_schema_fields_sql($definition['base_table']); - if (isset($entity_info[$name]['data table'])) { - $entity_info[$name]['schema_fields_sql']['data table'] = drupal_schema_fields_sql($entity_info[$name]['data table']); + if (isset($definition['data_table'])) { + $definition['schema_fields_sql']['data_table'] = drupal_schema_fields_sql($definition['data_table']); } if (isset($definition['revision_table'])) { $definition['schema_fields_sql']['revision_table'] = drupal_schema_fields_sql($definition['revision_table']);