forked from mirror/gorm
search不需要再clone,dbClone内的search已经是一个全新的了 (#2179)
This commit is contained in:
parent
447d578628
commit
ac6c89ec0c
2
main.go
2
main.go
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue