Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
zsinx authored Aug 16, 2021
1 parent 4c4eedf commit 6f9c01a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/gen_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (t *User) Delete(db *gorm.DB) (err error) {

// Updates update record
func (t *User) Updates(db *gorm.DB, m map[string]interface{}) (err error) {
if err = db.Model(&User{}).Where("id = ?", t.ID).Updates(m).Error; err != nil {
if err = db.Model(t).Updates(m).Error; err != nil {

err = ErrUpdateUser
return
Expand Down

0 comments on commit 6f9c01a

Please sign in to comment.