Use the original DB when create a new Scope

This commit is contained in:
Jinzhu 2014-08-27 16:40:32 +08:00
parent 5347765bd3
commit 8f22434ded
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ func (db *DB) NewScope(value interface{}) *Scope {
// New create a new Scope without search information
func (scope *Scope) New(value interface{}) *Scope {
return &Scope{db: scope.db.parent, Search: &search{}, Value: value}
return &Scope{db: scope.db, Search: &search{}, Value: value}
}
// NewDB create a new DB without search information