How do I use an array with an 'IN' condition on EntityFieldQuery::entityCondition? I read that entityCondition should take an array, and I've constructed an array according to examples I've seen on the web. But no dice. I get the error below. If I use a string, the error goes away.

Here's my code:

$query = new EntityFieldQuery();
$types = array('commerce_product', 'produce_share');
$query-&gt;entityCondition('entity_type', $types, 'IN');
$result = $query-&gt;execute();


And here's the error:

Warning: Illegal offset type in isset or empty in entity_get_info() (line 7690 of /**/includes/common.inc).
Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1573 of /**/includes/bootstrap.inc).
EntityFieldQueryException: Entity &lt;em class="placeholder"&gt;&lt;/em&gt; has no base table. in EntityFieldQuery-&gt;propertyQuery() (line 1209 of /**/includes/entity.inc).
Correct me if I'm wrong, but aren't commerce_product and product_share bundles not entity_type's (both of entity_type node)?

I think you may want:

// The types we're looking for.
$types = array('commerce_product', 'produce_share');

// Build the query.
$query = new EntityFieldQuery()

  // Looking for nodes.
  -&gt;entityCondition('entity_type', 'node')

  // With the specific bundles.
  -&gt;entityConditiion('bundle', $types, 'IN');

// Run the query.
$result = $query-&gt;execute();


https://www.drupal.org/node/1343708