Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not needed check for gorm.ErrRecordNotFound in Update() #21

Open
to6ka opened this issue Nov 30, 2017 · 0 comments
Open

not needed check for gorm.ErrRecordNotFound in Update() #21

to6ka opened this issue Nov 30, 2017 · 0 comments

Comments

@to6ka
Copy link
Contributor

to6ka commented Nov 30, 2017

218     if err := db.Model(o).Updates(u).Error; err != nil {
219         if err == gorm.ErrRecordNotFound {
220             return err
221         }
222 
223         return fmt.Errorf("can't update Entry %v fields %v: %s",
224             o, fields, err)
225     }

gorm will never return this error from Update()

jirfag added a commit that referenced this issue Feb 13, 2018
#21: generate DBSchemaField as exported type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants