Get list of nodes by field-collection value I am having field_feature as a collection of fields (field-collection) in a content type called 'watches'. Those fields are,

field_water_resistance -&gt; water_resistance(Term Reference)
field_gender -&gt; gender(Term Reference)
field_function -&gt; function(Term Reference)
field_sub_function -&gt; sub_function(Term Reference)


And so on.

I have my query like this:

$query = new EntityFieldQuery();
$query-&gt;entityCondition('entity_type', 'node')
    -&gt;propertyCondition('type', 'watches','=')
    -&gt;propertyCondition('status', 1);
$query-&gt;range($offset, 15);
$query-&gt;addTag('joinentity');
$query-&gt;addTag('fieldcollection');
$query-&gt;addMetaData('termscollection', $filterparams); // $filterparams is array of tids


Now I want to add above field collections in the query with the parameters (array of tids). How can we do that?

I know the EntityFieldQuery with the entity_type as field_collection_item but I don't know the same for entity_type as node.

How can we do that?
I think you have to possibilities to solve this:


Looks like you already got a tag for joining the field_group entities here: 

$query->addTag('joinentity');


You could then implement hook_query_joinentity_alter() to implement the join, see also EntityFieldQuery INNER JOIN


You use db_select() or db_query() and add your joins there rather than an EFQ. I think this is preferable as implementing tags and hooks for those gets a bit messy IMO.