From 246383326c2411813730b7272792ad4c9c27c838 Mon Sep 17 00:00:00 2001 From: Ivan Pusic Date: Mon, 28 Sep 2015 00:03:51 +0200 Subject: [PATCH] do not execute buildSelectQuery twice if buildSelectQuery() is executed twice, then we get more values in SqlVars than expected --- scope_private.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scope_private.go b/scope_private.go index 5b04a639..74adf1ff 100644 --- a/scope_private.go +++ b/scope_private.go @@ -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 {