forked from mirror/gorm
Reverted to original `NewRecord' func as per @jinzhu's feedback.
This commit is contained in:
parent
526fff01b7
commit
17917d49d8
5
main.go
5
main.go
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue