summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxjm2017-09-19 11:40:53 (GMT)
committerxjm2017-09-19 11:40:53 (GMT)
commitb62515363ceffacc6f3c99653b2f22693fdada64 (patch)
tree3c70e0c079c4ab96f3e95913260109e665f60326
parent214c6b589c4d05fb95afaa33195678ed68444145 (diff)
Issue #2908605 by jibran, jhedstrom, xjm, amateescu: Pass field storage to Tables::addNextBaseField()
-rw-r--r--core/lib/Drupal/Core/Entity/Query/Sql/Tables.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php b/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php
index e218247..95a766f 100644
--- a/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php
+++ b/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php
@@ -273,7 +273,15 @@ class Tables implements TablesInterface {
$entity_type = $this->entityManager->getDefinition($entity_type_id);
$field_storage_definitions = $this->entityManager->getFieldStorageDefinitions($entity_type_id);
// Add the new entity base table using the table and sql column.
- $base_table = $this->addNextBaseTable($entity_type, $table, $sql_column);
+ // An additional $field_storage argument is being passed to
+ // addNextBaseTable() in order to improve its functionality, for
+ // example by allowing extra processing based on the field type of the
+ // storage. In order to maintain backwards compatibility in 8.4.x, the
+ // new argument has not been added to the signature of that method,
+ // and it will be added only in 8.5.x.
+ // @todo Add the $field_storage argument to addNextBaseTable() in
+ // 8.5.x. https://www.drupal.org/node/2909425
+ $base_table = $this->addNextBaseTable($entity_type, $table, $sql_column, $field_storage);
$propertyDefinitions = [];
$key++;
$index_prefix .= "$next_index_prefix.";