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

[Question] Code example error in pages/zh_CN/gen/create.md Upsert / On Conflict #803

Open
Kira3270 opened this issue Nov 13, 2024 · 0 comments
Assignees

Comments

@Kira3270
Copy link

I noticed an error in the code example under the "Upsert / On Conflict" section of the documentation.
The line of code ”err := query.User.WithContext(ctx).Clauses(clause.OnConflict{DoUpdates: clause.AssignmentColumns([]string{"name", "age"}),}).Create(&user).Error“ is incorrect; the Error() method should not be called here because Create already returns an error pointer.

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