GORM Playground Link
https://github.com/go-gorm/playground/pull/449
Description
It appears that gorm isn't "scanning" zero values (or at least empty) strings into models. My test case sets the user name to "" and then searches for the user using the result model from the previous test. That result has a name set to "jinzhu" but the database has a name of "". Unfortunately, the result returned still has a name of "jinzhu" which isn't correct since the value in the database is "".
Comment From: a631807682
if user.Name != "" {
t.Errorf("name should be set to %q but it's now: %q", "", user.Name)
}
https://github.com/go-gorm/playground/pull/449/files#diff-79ce3229c13921b79b1175dcb211336aaf84dfd8edcf19c07698934d4fe70e5eR46
Seems the error throw by here appears to checking the wrong object.