Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
The 7.x-3.x doesn't look to provide actual Field API fields, so you aren't going to get any benefit using EntityFieldQuery and you should use a combination of EntityFieldQuery() to search across the non-location fields and narrow down the list of possible nids, and then a manual query with db_select() running the joins on the location tables you need. That might be your best bet.
class LocationEntityFieldQuery extends EntityFieldQuery {
function finishQuery($select_query, $id_key = 'entity_id') {
// oh hai $select_query! I can haz location filters added.
}
}
Comments
Comment #1
dave reidThe 7.x-3.x doesn't look to provide actual Field API fields, so you aren't going to get any benefit using EntityFieldQuery and you should use a combination of EntityFieldQuery() to search across the non-location fields and narrow down the list of possible nids, and then a manual query with db_select() running the joins on the location tables you need. That might be your best bet.
Comment #2
cosmicdreams commentedIs there some magic that coverts a previously defined EntityFieldQuery into a SelectQuery ? I'm having trouble doing this:
Comment #3
dave reidUnfortunately not. You're maybe just best querying directly:
Comment #4
chx commentedComment #5
legolasboClosing support tickets that have been inactive for over a year to clean up the issue queue. Please reopen if this is still an issue.