diff --git a/core/lib/Drupal/Core/Entity/FieldableDatabaseStorageController.php b/core/lib/Drupal/Core/Entity/FieldableDatabaseStorageController.php index b3afd9b..8afb64c 100644 --- a/core/lib/Drupal/Core/Entity/FieldableDatabaseStorageController.php +++ b/core/lib/Drupal/Core/Entity/FieldableDatabaseStorageController.php @@ -152,11 +152,16 @@ public function __construct($entity_type, array $entity_info, Connection $databa $this->revisionKey = FALSE; } - // Check if the entity type has a dedicated table for properties. + // Check if the entity type has a dedicated table for fields. if (!empty($this->entityInfo['data_table'])) { $this->dataTable = $this->entityInfo['data_table']; } + // Check if the entity type has a dedicated revision data table for fields. + if (!empty($this->entityInfo['revision_data_table'])) { + $this->revisionDataTable = $this->entityInfo['revision_data_table']; + } + $this->entityClass = $this->entityInfo['class']; } @@ -637,7 +642,7 @@ protected function saveRevision(EntityInterface $entity) { } } else { - drupal_write_record($this->revisionTable, $record, array($this->revisionKey)); + drupal_write_record($this->revisionTable, $record, $this->revisionKey); } // Make sure to update the new revision key for the entity. @@ -1298,7 +1303,7 @@ static public function _fieldColumnName(FieldInterface $field, $column) { * * @param array $records * Associative array of query results, keyed on the entity ID. - * @param boolean $load_revision + * @param bool $load_revision * (optional) TRUE if the revision should be loaded, defaults to FALSE. * * @return array