We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go-gorm/playground#723
According to https://gorm.io/docs/query.html#Retrieving-objects-with-primary-key
This should work:
var result User db.Model(User{ID: 10}).First(&result) // SELECT * FROM users WHERE id = 10;
But instead it ignores the ID in the Model() parameter.
The text was updated successfully, but these errors were encountered:
Friendly bump, any update here?
Sorry, something went wrong.
jinzhu
No branches or pull requests
GORM Playground Link
go-gorm/playground#723
Description
According to https://gorm.io/docs/query.html#Retrieving-objects-with-primary-key
This should work:
But instead it ignores the ID in the Model() parameter.
The text was updated successfully, but these errors were encountered: