FIX Use addInnerJoin instead of innerJoin to fix deprec error

This commit is contained in:
Hamish Friedlander 2012-07-19 13:34:23 +12:00
parent 3cc660484c
commit 38c88094b9

View File

@ -444,7 +444,7 @@ abstract class SearchIndex extends ViewableData {
}
else if ($step['through'] == 'has_many') {
$sql = new SQLQuery('"'.$step['class'].'"."ID"', $step['class'], '"'.$step['otherclass'].'"."ID" IN ('.implode(',', $ids).')');
$sql->innerJoin($step['otherclass'], '"'.$step['class'].'"."ID" = "'.$step['otherclass'].'"."'.$step['foreignkey'].'"');
$sql->addInnerJoin($step['otherclass'], '"'.$step['class'].'"."ID" = "'.$step['otherclass'].'"."'.$step['foreignkey'].'"');
singleton($step['class'])->extend('augmentSQL', $sql);
$ids = $sql->execute()->column();