From 8f22434ded8e09b8deb70601fdd3f78127ca05e1 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Wed, 27 Aug 2014 16:40:32 +0800 Subject: [PATCH] Use the original DB when create a new Scope --- scope.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scope.go b/scope.go index 668bc1e3..6ce87cea 100644 --- a/scope.go +++ b/scope.go @@ -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