Reverted to original `NewRecord' func as per @jinzhu's feedback.

This commit is contained in:
Jay Taylor 2015-08-12 09:32:18 -07:00
parent 526fff01b7
commit 17917d49d8
1 changed files with 1 additions and 4 deletions

View File

@ -365,10 +365,7 @@ func (s *DB) Rollback() *DB {
} }
func (s *DB) NewRecord(value interface{}) bool { func (s *DB) NewRecord(value interface{}) bool {
scope := s.clone().NewScope(value) return s.clone().NewScope(value).PrimaryKeyZero()
result := scope.PrimaryKeyZero()
s.err(scope.db.Error)
return result
} }
func (s *DB) RecordNotFound() bool { func (s *DB) RecordNotFound() bool {