how to add mutilple entity_type and bundles in EntityFieldQuery?

$query->entityCondition('entity_type', 'profile2') ->entityCondition('bundle', 'user_profile');

Is there any way to do like this

$query->entityCondition('entity_type', array('profile2','user')) ->entityCondition('bundle', array('user_profile','property'));

  • can you pls tell me how to add multiple entity_type.
    – Mukilan R
    Sep 5, 2014 at 8:27

1 Answer 1


This should work:

$query->entityCondition('entity_type', array('profile2','user'))
      ->entityCondition('bundle', array('user_profile','property'), 'IN');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.