An EntityFieldQuery
doesn't allow for IS NOT NULL
or similar conditions, so there's no way to query for all nodes that contain a value for a particular field. You can only query nodes that have a specific value for a particular field.
They're also self-contained, so there's no way to add an extra join unless you implement hook_query_alter()
and physically add the join once the query has been converted from an EntityFieldQuery
to a standard SelectQuery
. That, or sub-class EntityFieldQuery
and add the new logic yourself.
That said you'll need to form the query yourself. If you're just querying for nodes though, I'd advise using the taxonomy_index
table rather than the field tables, as that will produce cleaner queries and make life easier further down the line.