Commit 31730f3a authored by amitaibu's avatar amitaibu

Issue #2336631 by Amitaibu | Ambidex: Fixed OG breaks EntityFieldQuery count query.

parent 458945de
......@@ -1459,9 +1459,17 @@ function og_query_og_membership_alter(QueryAlterableInterface $query) {
$fields['bundle']['table'] = $base_table;
$fields['bundle']['field'] = !empty($entity_info['entity keys']['bundle']) ? $entity_info['entity keys']['bundle'] : $id;
$fields['entity_type']['table'] = 'ogm';
$fields['entity_type']['field'] = 'entity_type';
$fields['entity_id']['table'] = 'ogm';
$fields['entity_id']['field'] = 'etid';
// Populate the alias key, as it might be empty on COUNT queries.
foreach (array_keys($fields) as $key) {
if (empty($fields[$key]['alias'])) {
$fields[$key]['alias'] = $key;
}
}
$ogm = array(
'join type' => NULL,
'table' => 'og_membership',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment