mirror of https://github.com/go-gorm/gorm.git
do not execute buildSelectQuery twice
if buildSelectQuery() is executed twice, then we get more values in SqlVars than expected
This commit is contained in:
parent
37bf87aa29
commit
246383326c
|
@ -217,7 +217,7 @@ func (scope *Scope) selectSql() string {
|
|||
}
|
||||
sql := scope.buildSelectQuery(scope.Search.selects)
|
||||
scope.Search.countingQuery = (len(scope.Search.group) == 0) && hasCountRegexp.MatchString(sql)
|
||||
return scope.buildSelectQuery(scope.Search.selects)
|
||||
return sql
|
||||
}
|
||||
|
||||
func (scope *Scope) orderSql() string {
|
||||
|
|
Loading…
Reference in New Issue