commit 60889b36abfeb42ef92dfaefba0c71b51c87d7b4 Author: fago Date: Mon Dec 31 17:07:02 2012 +0100 Fixed EntityQuery relationships. diff --git a/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Tables.php b/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Tables.php index bf02e2b..f9ffaf5 100644 --- a/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Tables.php +++ b/core/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Tables.php @@ -183,9 +183,9 @@ function addField($field, $type, $langcode) { $next_index_prefix = $relationship_specifier; } // Check for a valid relationship. - if (isset($propertyDefinitions[$relationship_specifier]['constraints']['entity type']) && isset($propertyDefinitions[$relationship_specifier]['settings']['id source'])) { + if (isset($propertyDefinitions[$relationship_specifier]['constraints']['EntityType']) && isset($propertyDefinitions[$relationship_specifier]['settings']['id source'])) { // If it is, use the entity type. - $entity_type = $propertyDefinitions[$relationship_specifier]['constraints']['entity type']; + $entity_type = $propertyDefinitions[$relationship_specifier]['constraints']['EntityType']; $entity_info = entity_get_info($entity_type); // Add the new entity base table using the table and sql column. $join_condition= '%alias.' . $entity_info['entity_keys']['id'] . " = $table.$sql_column"; @@ -195,7 +195,7 @@ function addField($field, $type, $langcode) { $index_prefix .= "$next_index_prefix."; } else { - throw new QueryException(format_string('Invalid specifier @next.', array('@next' => $next))); + throw new QueryException(format_string('Invalid specifier @next.', array('@next' => $relationship_specifier))); } } }