It has only to do with the act of correct observation, and by I mean a physical contact with all sorts of objects through all the senses

Gorm 中 Scan 和 Find 的区别

the difference of Gorm scan and find

我们可以先看 Scan 和 Find 在 Gorm 中的接口定义\nFInd\n// gorm/finisher_api.go\n// Find find records that match given conditions\nfunc (db *DB) Find(dest interface{}, c

Gorm 改造指针对象

gorm object support pointer

最近项目中正好用到 Gorm 在使用 Gorm 的过程中发现在进行对象查询的时候不支持指针。具体的文档如下:\n如果我们强行使用指针进行查询代码如下:\nvar user *User\n// doesn't work\ndb.First(&user)\n\nGo\n会得到 \"invalid value\" 的错误\n