Open zchenyu opened 5 months ago
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;
According to https://gorm.io/docs/query.html#Retrieving-objects-with-primary-key
This should work: