Nineya
Home
Blog
软著申请
Gorm How to use ssl connection?
2025-01-14 17:02:21
1336
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?
2025-01-14 17:02:18
1687
gorm v1 是否支持多个update语句一次发送到MySQL?比如官方的例子:multiStatementsType: boolValid Values: true, falseDefault: f...
Gorm 在gen时候如何移除comment标签?
2025-01-14 17:02:15
1931
Your Question在gen.go生成model与query,如何配置不生成comment标签,目前生成如下:type SsoPosRole struct { ID int64 `gorm:"col...
Gorm 为gorm.Model基础模型ID字段添加json标签,方便模型参与数据的json序列化
2025-01-14 17:02:13
673
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
2025-01-14 17:02:10
3175
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
2025-01-14 17:02:08
1439
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
2025-01-14 17:02:05
2959
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?
2025-01-14 17:02:03
1947
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?
2025-01-14 17:02:00
2046
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?
2025-01-14 17:01:57
693
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
2025-01-14 17:01:55
1840
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
2025-01-14 17:01:43
615
Your QuestionCompare before and after (Dest) values on BeforeUpdatefunc (u *User) BeforeUpdate(tx *gorm.DB) (err error) ...
Gorm Static value in JOIN queries
2025-01-14 17:01:40
1090
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使用的疑惑
2025-01-14 17:01:37
478
您好,我想请教一个问题,在将数据库模型转换成视图模型的时候可以使用gorm中scan这个方法,gorm我是在dao层使用的,如果使用gorm的话就会出现这么一个情况:dao层既用了vo层又用了repository层的结构体,这样就会让项目的...
Gorm Polyphormic has-many association with separate association table
2025-01-14 17:01:35
4049
Your QuestionI have something like this:type MovieAmateur struct { ID int `gorm:"primary_key";autoIncrem...
Gorm Panic:interface conversion
2025-01-14 17:01:32
681
panic: interface conversion: interface {} is int64, not []uint8Why often report panic like this when I USING GORM?db.Fin...
Gorm whereHas like feature
2025-01-14 17:01:29
2370
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?
2025-01-14 17:01:27
901
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
2025-01-14 17:01:23
1706
Descriptiontype Account struct { AccountID uint `gorm:"primaryKey"` CurrencyCode string // .. othe...
Gorm preload的数据需要join
2025-01-14 17:01:06
544
Your Question第三层数据需要left join 另外一张表sku,拿到若干字段放到line,这个join和select该怎么写,折腾了几天了,没找到解决办法db.Preload("Pos.Lines").Joins("LEFT ...
上一页
下一页
1
…
946
947
948
949
950
…
2246
.