Hello :-)

I need to make an EntityFieldQuery() for a profile2 entity using a value of a field in a field collection.
In particular I have to select all users that have a certain field with a NID reference in it:

Profile2 -> field_assigned (Field Collection) -> field_event (Field with Node Reference)

I used to have the Event field in the Profile2 and I used

$query->entityCondition('entity_type', 'profile2')
  ->entityCondition('bundle', 'volunteer')
  ->fieldCondition('field_event', 'nid', $nid, '=')

Now, how do I search for that nid within the field collection?

Thank you

Comments

fnapo created an issue.