mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Removed unnecessary duplication of columns in SearchContext SELECT clause
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@72006 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2b972c45e7
commit
2f2d0c72b1
@ -105,16 +105,12 @@ class SearchContext extends Object {
|
||||
public function getQuery($searchParams, $sort = false, $limit = false, $existingQuery = null) {
|
||||
$model = singleton($this->modelClass);
|
||||
|
||||
$fields = $this->applyBaseTableFields($model);
|
||||
|
||||
if($existingQuery) {
|
||||
$query = $existingQuery;
|
||||
} else {
|
||||
$query = $model->buildSQL();
|
||||
}
|
||||
|
||||
$query->select = array_merge($query->select,$fields);
|
||||
|
||||
$SQL_limit = Convert::raw2sql($limit);
|
||||
$query->limit($SQL_limit);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user