fix aggregate selecting bug.
This commit is contained in:
parent
6c1e3578ad
commit
ea13ddfb7f
|
@ -75,6 +75,11 @@ final protected function concatenate($components)
|
|||
*/
|
||||
protected function selects(Query $query)
|
||||
{
|
||||
// Sometimes developers may set a "select" clause on the same query that
|
||||
// is performing in aggregate look-up, such as during pagination. So we
|
||||
// will not generate the select clause if an aggregate is present.
|
||||
if ( ! is_null($query->aggregate)) return;
|
||||
|
||||
$select = ($query->distinct) ? 'SELECT DISTINCT ' : 'SELECT ';
|
||||
|
||||
return $select.$this->columnize($query->selects);
|
||||
|
|
|
@ -44,6 +44,8 @@ public function select(Query $query)
|
|||
*/
|
||||
protected function selects(Query $query)
|
||||
{
|
||||
if ( ! is_null($query->aggregate)) return;
|
||||
|
||||
$select = ($query->distinct) ? 'SELECT DISTINCT ' : 'SELECT ';
|
||||
|
||||
// Instead of using a "LIMIT" keyword, SQL Server uses the "TOP"
|
||||
|
|
Loading…
Reference in New Issue