Skip to content

Commit 858f454

Browse files
patrickomearataylorotwell
authored andcommitted
set/reset the select to from.*
* wrapping a join with the same table column name produces a duplicate column error
1 parent 8b9a31b commit 858f454

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Illuminate/Database/Query/Builder.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -2280,7 +2280,8 @@ protected function runPaginationCountQuery($columns = ['*'])
22802280
*/
22812281
protected function cloneForPaginationCount()
22822282
{
2283-
return $this->cloneWithout(['orders', 'limit', 'offset'])
2283+
return $this->select($this->from.'.*')
2284+
->cloneWithout(['orders', 'limit', 'offset'])
22842285
->cloneWithoutBindings(['order']);
22852286
}
22862287

0 commit comments

Comments
 (0)