GORM Playground Link
https://github.com/go-gorm/playground/pull/1
Description
go.mod引用:
gorm.io/gen v0.3.16
gorm.io/gorm v1.24.0
gorm.io/plugin/dbresolver v1.2.3
编译出现如下错误:
2022/10/08 10:15:38 ERROR ▶ 0006 Failed to build the application: # gorm.io/plugin/dbresolver
/go/pkg/mod/gorm.io/plugin/dbresolver@v1.2.3/dbresolver.go:139:18:
cannot use map[string]gorm.Stmt{} (value of type map[string]gorm.Stmt) as type map[string]*gorm.Stmt in struct literal
截图如下:
Comment From: jinzhu
Fixed that,please upgrade dbresolver to latest version.
Thank you for your report.
Comment From: zsy619
Fixed that,please upgrade dbresolver to latest version.
Thank you for your report.
dbresolver 最新版本是v1.2.3,更新之后还是不行?还需要如何操作 gorm v1.24.0这个版本有问题,降级到 v1.23.0 可以编译通过
Comment From: zsy619
看了下gen项目,引用如下:
gorm.io/gorm v1.23.9-0.20220713102635-3262daf8d468
gorm.io/hints v1.1.0
gorm.io/plugin/dbresolver v1.2.2
也就是gen没有引用最新的类库引起的,需要对gen项目进行修订