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

This commit is contained in:
李鹏 2019-01-02 21:25:37 +08:00 committed by Jinzhu
parent 447d578628
commit ac6c89ec0c
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ func (s *DB) SingularTable(enable bool) {
func (s *DB) NewScope(value interface{}) *Scope { func (s *DB) NewScope(value interface{}) *Scope {
dbClone := s.clone() dbClone := s.clone()
dbClone.Value = value 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 // QueryExpr returns the query as expr object