Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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