Gorm How to use ssl connection?

Your QuestionIn order to secure our service, we need to use SSL certificate to connect to MySQL. How to use or config to...

Gorm gorm v1 是否支持多个update语句一次发送到MySQL?

gorm v1 是否支持多个update语句一次发送到MySQL?比如官方的例子:multiStatementsType: boolValid Values: true, falseDefault: f...

Gorm 在gen时候如何移除comment标签?

Your Question在gen.go生成model与query,如何配置不生成comment标签,目前生成如下:type SsoPosRole struct { ID int64 `gorm:"col...

Gorm 为gorm.Model基础模型ID字段添加json标签,方便模型参与数据的json序列化

Describe the feature很多时候我们需要将序列化的模型数据返回给前端,而前端很多情况下json字段名是帕斯卡类型命名的,还有protobuf字段也是帕斯卡类型命名,为了直接可以使用模型进行序列化返回,建议添加ID字段的jso...

Gorm Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stu

DescriptionWhen i build with gorm and sqlite, Then start the binary,I got the errors:[error] failed to initialize datab...

Gorm Support deleting Object with Self-Reference(Many-to-many) by cascade

Describe the featureModel A has many Prev-Model-A and many Next-Model-A, e.g. Task, PrevTasks, NextTasksIf Task was dele...

Gorm Support deleting multi nested relationship mapping by cascade

Describe the featureModel A has many Model B, Model B has many Model CIf Model A was deleted, Model B and Model C both s...

Gorm How to query a JSONSlice column properly with @> operator?

Your QuestionHow do you properly select a row by a JSONSlice column with @> operator? I have the following code:type ...

Gorm How to not update updated_at for some specific operations?

Your issue may already be reported! Please search on the issue track before creating one.What version of Go are you usin...

Gorm Option to ignore write permissions of model fields?

Your QuestionIt is possible to ignore write permission of model fields ? Already exists .Omit() that ignores specific co...

Gorm Preloading with inner join with condition on nested table

Your QuestionI have the following nested structure (simplified for clarity; I'm not actually dealing with fruits): A mai...

Gorm Compare before and after values on BeforeUpdate

Your QuestionCompare before and after (Dest) values on BeforeUpdatefunc (u *User) BeforeUpdate(tx *gorm.DB) (err error) ...

Gorm Static value in JOIN queries

Is there a way to query with a static value?I have three tables:- tx_news_domain_model_news Fields: - uid- sys_categor...

Gorm 关于gorm中scan使用的疑惑

您好,我想请教一个问题,在将数据库模型转换成视图模型的时候可以使用gorm中scan这个方法,gorm我是在dao层使用的,如果使用gorm的话就会出现这么一个情况:dao层既用了vo层又用了repository层的结构体,这样就会让项目的...

Gorm Polyphormic has-many association with separate association table

Your QuestionI have something like this:type MovieAmateur struct { ID int `gorm:"primary_key";autoIncrem...

Gorm Panic:interface conversion

panic: interface conversion: interface {} is int64, not []uint8Why often report panic like this when I USING GORM?db.Fin...

Gorm whereHas like feature

Describe the featureI need to check values through relationships. for example, i have a user model that has a pet model...

Gorm How to manage tables with static data?

Your QuestionHow can I have GORM take care of tables with static data?Say I have a table with different currencies. A si...

Gorm gorm:primaryKey ignores the structure field type and set only int8

Descriptiontype Account struct { AccountID uint `gorm:"primaryKey"` CurrencyCode string // .. othe...

Gorm preload的数据需要join

Your Question第三层数据需要left join 另外一张表sku,拿到若干字段放到line,这个join和select该怎么写,折腾了几天了,没找到解决办法db.Preload("Pos.Lines").Joins("LEFT ...
上一页 下一页
.