src/ORM/Filters/SearchFilter.php
public function applyAggregate(DataQuery $query, $having)
    {
        $schema = DataObject::getSchema();
        $baseTable = $schema->baseDataTable($query->dataClass());

        return $query
            ->having($having)
            ->groupby("\"{$baseTable}\".\"ID\"");
    }
public function applyAggregate(DataQuery $query, $having)
    {
        $schema = DataObject::getSchema();
        $baseTable = $schema->baseDataTable($query->dataClass());

        return $query
            ->having($having)
            ->groupby("\"{$baseTable}\".\"ID\"");
    }
public function applyAggregate ( DataQuery $ query , $ having ) { $ schema = DataObject :: getSchema ( ) ; $ baseTable = $ schema -> baseDataTable ( $ query -> dataClass ( ) ) ; return $ query -> having ( $ having ) -> groupby ( "\"{$baseTable}\".\"ID\"" ) ; }
Given an escaped HAVING clause, add it along with the appropriate GROUP BY clause
@param  DataQuery $query
@param  string    $having
@return DataQuery
Given an escaped HAVING clause add it along with the appropriate GROUP BY clause