forked from mirror/gorm
Modify count regex to match parenthesis instead of starting a capture. Fixes #679
This commit is contained in:
parent
611e613459
commit
a3c1fda757
|
@ -208,7 +208,7 @@ func (scope *Scope) whereSql() (sql string) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var hasCountRegexp = regexp.MustCompile(`(?i)count(.+)`)
|
var hasCountRegexp = regexp.MustCompile(`(?i)count\(.+\)`)
|
||||||
|
|
||||||
func (scope *Scope) selectSql() string {
|
func (scope *Scope) selectSql() string {
|
||||||
if len(scope.Search.selects) == 0 {
|
if len(scope.Search.selects) == 0 {
|
||||||
|
|
Loading…
Reference in New Issue