gorm document has an update example: http://gorm.io/zh_CN/docs/upd.
db.First(&user)
user.Name = "jinzhu 2"
user.Age = 100
db.Save(&user)
//// UPDATE users SET name="jinzhu 2", age=100, birthday="2016-01-01", updated_at = "2013-11-17 21:34:10" WHERE id=111;
question:
the last line of comment, where did id=111
come from? The user above has an id field by default. Will the gorm framework automatically place this id field in the id of the sql query statement? What if it is not id, but uuid, can only be queried manually with where?