? entity-1041240_2.patch
? entity-1041240_3.patch
Index: entity.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/entity/Attic/entity.test,v
retrieving revision 1.1.2.10
diff -u -p -r1.1.2.10 entity.test
--- entity.test	19 Jan 2011 17:39:51 -0000	1.1.2.10
+++ entity.test	29 Jan 2011 04:46:25 -0000
@@ -576,7 +576,7 @@ class EntityMetadataTestCase extends Dru
     $values[LANGUAGE_NONE][0] = array('value' => 'foo');
     $node = $this->drupalCreateNode(array($this->field_name => $values, 'title' => $title));
 
-    $results = entity_property_query('node', 'title', array($title, 'another title'));
+    $results = entity_property_query('node', 'title', $title);
     $this->assertEqual($results, array($node->nid), 'Queried nodes with a given title.');
 
     $results = entity_property_query('node', $this->field_name, 'foo');
Index: modules/callbacks.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/entity/modules/Attic/callbacks.inc,v
retrieving revision 1.1.2.7
diff -u -p -r1.1.2.7 callbacks.inc
--- modules/callbacks.inc	19 Jan 2011 17:39:51 -0000	1.1.2.7
+++ modules/callbacks.inc	29 Jan 2011 04:46:25 -0000
@@ -649,11 +649,11 @@ function entity_metadata_view_single($en
 function entity_metadata_table_query($entity_type, $property, $value, $limit) {
   $query = new EntityFieldQuery();
   $query->entityCondition('entity_type', $entity_type, '=')
-        ->entityCondition($property, $value, '=')
+        ->propertyCondition($property, $value, '=')
         ->range(0, $limit);
 
   $result = $query->execute();
-  return array_keys($result[$entity_type]);
+  return !empty($result[$entity_type]) ? array_keys($result[$entity_type]) : array();
 }
 
 /**
