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

fix issue #3776 #4160

Merged
merged 1 commit into from
Aug 14, 2020
Merged

fix issue #3776 #4160

merged 1 commit into from
Aug 14, 2020

Conversation

AllenX2018
Copy link
Collaborator

fixes #3776

fix the bug that Fielder's SetRaw is not called when calling orm.Raw() to query from database

@AllenX2018
Copy link
Collaborator Author

Seems that the unit test will fail with postgresql. Pls wait and I will fix it.

fd := field.Addr().Interface().(Fielder)
err := fd.SetRaw(value)
if err != nil {
return fmt.Errorf("set raw error:%s", err)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using github.com/pkg/errors, we can change it in the future. I will check this PR this weekend.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. But I wonder what's the difference between errors.New() and fmt.Errorf() ?

@flycash flycash merged commit 8574e30 into beego:develop-2.0 Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants