diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php index 3835e9c..019cad4 100644 --- a/core/modules/views/src/Plugin/views/query/Sql.php +++ b/core/modules/views/src/Plugin/views/query/Sql.php @@ -1255,7 +1255,7 @@ public function query($get_count = FALSE) { foreach ($entity_information as $entity_type_id => $info) { $entity_type = \Drupal::entityManager()->getDefinition($info['entity_type']); - $base_field = $info['revision'] ? $entity_type->getKey('id') : $entity_type->getKey('revision'); + $base_field = !$info['revision'] ? $entity_type->getKey('id') : $entity_type->getKey('revision'); $this->addField($info['alias'], $base_field, '', $params); } }