]);
$rows = $selector->getRows(CRM_Core_Action::VIEW, 0, 50, '');
$this->assertEquals(1, count($rows));
+
+ CRM_Core_DAO::reenableFullGroupByMode();
+ $rows = $selector->getRows(CRM_Core_Action::VIEW, 0, 50, '');
+
$sortChar = $selector->alphabetQuery()->fetchAll();
// sort name is stored in '<last_name>, <first_name>' format, as per which the first character would be B of Bond
$this->assertEquals('B', $sortChar[0]['sort_name']);
$this->assertEquals($contactID, key($rows));
+
+ CRM_Core_DAO::reenableFullGroupByMode();
+ $selector->getQueryObject()->getCachedContacts([$contactID], FALSE);
}
}
}
// build cache key and use to it to fetch prev-next cache record
$cacheKey = 'civicrm search ' . $key;
$contacts = CRM_Utils_SQL_Select::from('civicrm_prevnext_cache')
- ->select(['entity_id1', 'cacheKey'])
- ->where("cacheKey = @key")
+ ->select(['entity_id1', 'cachekey'])
+ ->where("cachekey = @key")
->param('key', $cacheKey)
->execute()
->fetchAll();
// check the prevNext record matches
$expectedEntry = [
'entity_id1' => $contactID,
- 'cacheKey' => $cacheKey,
+ 'cachekey' => $cacheKey,
];
$this->checkArrayEquals($contacts[0], $expectedEntry);
}