forked from mirror/gorm
Delete select clause after Count, close #3814
This commit is contained in:
parent
0c12a4c360
commit
51568ba4ab
|
@ -377,7 +377,7 @@ func (db *DB) Count(count *int64) (tx *DB) {
|
||||||
}
|
}
|
||||||
|
|
||||||
tx.Statement.AddClause(clause.Select{Expression: expr})
|
tx.Statement.AddClause(clause.Select{Expression: expr})
|
||||||
defer tx.Statement.AddClause(clause.Select{})
|
defer delete(tx.Statement.Clauses, "SELECT")
|
||||||
}
|
}
|
||||||
|
|
||||||
if orderByClause, ok := db.Statement.Clauses["ORDER BY"]; ok {
|
if orderByClause, ok := db.Statement.Clauses["ORDER BY"]; ok {
|
||||||
|
|
Loading…
Reference in New Issue