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] please document the fact that gorm:query_option is no longer supported in v2 #403

Closed
urisimchoni opened this issue Mar 9, 2021 · 1 comment
Assignees

Comments

@urisimchoni
Copy link

Document Link

https://gorm.io/docs/v2_release_note.html

Your Question

In v1.0, I've used gorm:query_option to do a locking read, as in:

db = db.Set("gorm:query_option", "FOR UPDATE")
db.Where("ID = ?", id).First(&customer)

This still compiles in v2 but has no effect and leads to subtle bugs.

Expected answer

Please add this issue to the migration guide and point to the documentation on locking reads.

@jinzhu
Copy link
Member

jinzhu commented Nov 1, 2021

this feature is not documented in v1, so it is not mentioned in the release note.

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