search不需要再clone,dbClone内的search已经是一个全新的了

This commit is contained in:
lpxxn 2018-11-15 11:59:33 +08:00
parent 472c70caa4
commit 4c79ac8196

View File

@ -170,7 +170,7 @@ func (s *DB) SingularTable(enable bool) {
func (s *DB) NewScope(value interface{}) *Scope {
dbClone := s.clone()
dbClone.Value = value
return &Scope{db: dbClone, Search: dbClone.search.clone(), Value: value}
return &Scope{db: dbClone, Search: dbClone.search, Value: value}
}
// QueryExpr returns the query as expr object