commit 20a78e3bc9c49cdfc03aa6056b17736855a74335 Author: fago Date: Sun Jun 1 14:08:01 2014 -0500 Improved entity query to check for the sql interface first. diff --git a/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php b/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php index 54664d1..6926603 100644 --- a/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php +++ b/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php @@ -259,13 +259,13 @@ protected function addJoin($type, $table, $join_condition, $langcode) { */ protected function getTableMapping($table, $entity_type_id) { $storage = $this->entityManager->getStorage($entity_type_id); - // @todo Stop calling drupal_get_schema() once menu links are converted - // to the Entity Field API. See https://drupal.org/node/1842858. - $schema = drupal_get_schema($table); - if (!$schema && $storage instanceof SqlEntityStorageInterface) { + if ($storage instanceof SqlEntityStorageInterface) { $mapping = $storage->getTableMapping()->getAllColumns($table); } else { + // @todo Stop calling drupal_get_schema() once menu links are converted + // to the Entity Field API. See https://drupal.org/node/1842858. + $schema = drupal_get_schema($table); $mapping = array_keys($schema['fields']); } return array_flip($mapping);