qqxhb
qqxhb
@goodking-bq try `conf.WithImportPkgPath("gen-test/a/model")`
@c342ng 支持组合,但是只能放最后 https://gorm.io/gen/dynamic_sql.html#Code-Snippets 如果是中间做条件,可以看下 Scope
Querier不要和 main在一个路径下
@DrmagicE https://gorm.io/gen/delete.html#Soft-Delete
@Anniext 是符合预期的哈 https://gorm.io/docs/update.html#Updates-multiple-columns 没有办法区分你的0是默认值还是你设置的哈
> @qqxhb 根据这个文档,如果想要更新所有列,需要Select("*")。 > > ```go > // Select all fields (select all fields include zero value fields) > db.Model(&user).Select("*").Updates(User{Name: "jinzhu", Role: "admin", Age: 0}) > ``` > > 但是实际测试发现,Select(u.ALL)...
@hww9035 写个复现demo吧,如果这个都不能执行,功能基本上就是不可用的状体,不太可能 没有看到sql日志,是通过什么判断没有执行的呢? sql日志可以加上.Debug()看看 多个条件也可以直接写到一个where里,当然你现在的用法也是没问题的
We recommend using script generation. https://gorm.io/gen/database_to_structs.html
@CaoPengflying Check the err in the log
`FieldType` https://gorm.io/gen/database_to_structs.html#Field-Options