From 17917d49d8d46788148d3e904595d9d5030754f5 Mon Sep 17 00:00:00 2001 From: Jay Taylor Date: Wed, 12 Aug 2015 09:32:18 -0700 Subject: [PATCH] Reverted to original `NewRecord' func as per @jinzhu's feedback. --- main.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/main.go b/main.go index df3c29b4..ae406b8d 100644 --- a/main.go +++ b/main.go @@ -365,10 +365,7 @@ func (s *DB) Rollback() *DB { } func (s *DB) NewRecord(value interface{}) bool { - scope := s.clone().NewScope(value) - result := scope.PrimaryKeyZero() - s.err(scope.db.Error) - return result + return s.clone().NewScope(value).PrimaryKeyZero() } func (s *DB) RecordNotFound() bool {