Nineya
Home
Blog
软著申请
Gorm offset and limit working unexpectedly, resulting limit 0 in compiled SQL
2025-01-14 08:40:29
5064
Environmentgolang version: 1.18gorm version: v1.24.3ProblemWe've been using gorm in our production environment. Recently...
Gorm Checking which key is duplicate, in case of a ErrDuplicateKey error
2025-01-14 08:40:26
356
Your QuestionIs there a way to check which key was duplicate, in case of a ErrDuplicateKey error?The document you expect...
Gorm Preload data from interface given in func
2025-01-14 08:40:23
1424
I have the following structs:type User struct { gorm.Model Username string Orders []Order}type Order struct { gorm...
Gorm 关于引号,反引号的建议
2025-01-14 08:40:21
1241
Describe the feature张⾦柱大佬好,自学小白一枚,看了半天,搜了半天也没理解为何 ? (就是where("name = ?",name)) 除了int一定要给加单引号。是为了防止注入?我的情况是这样的,一个更改状态的语句(...
Gorm Scan after using Scopes function panicks if *gorm.DB object is used for fetching other data.
2025-01-14 08:40:18
3923
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/577DescriptionWe currently use the Scopes function, admit...
Gorm type标签无法指定time类型?
2025-01-14 08:40:16
2215
通过type标签指定At为Time类型:type Test struct { At string `gorm:"type:time"`}但AutoMigrate时却使用了datetime类型:[3.979ms] [...
Gorm Embedded nil pointer structs should be retrieved as nil
2025-01-14 08:40:13
3631
Describe the featureGorm should round trip an embedded pointer to a struct as nil when the struct is given as nil.Motiva...
Gorm Omit has-many association without zeroing the value
2025-01-14 08:40:10
1506
Your QuestionHello,I'm trying to omit has-many association, without zeroing the value of the field (so I would get the e...
Gorm If the created_at field is not added, the db.Save() function will continue to perform insertion operations.
2025-01-14 08:40:08
1172
GORM Playground LinkThis is a fake URL to prevent this bug from being overlooked: https://github.com/go-gorm/playground/...
Gorm Allow column to be created but not altered on migration
2025-01-14 08:40:05
6445
Describe the featureI would like to specify a column to be created when auto migration run only if the column does not y...
Gorm Backreference, will ignore my custom join table
2025-01-14 08:40:02
1973
Backreference, will ignore my custom join tablemany2many When many2many customizes the join table, if it is backreferenc...
Gorm Sometimes Error is "<nil>" instead of nil
2025-01-14 08:40:00
780
Your Questionif res = db.Save(&msg); res.Error != nil { log.Error(err) return}I have simple code which is upda...
Gorm SQL Error when select multiple fields with ?
2025-01-14 08:39:58
1765
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionCode:query := db.Model("table_name"...
Gorm Many2Many fails when Creating object that uses UUID for ID
2025-01-14 08:39:55
1881
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/588DescriptionWhen the primary key is a UUID that is gene...
Gorm record not found error in the log should not be warn level
2025-01-14 08:39:52
1197
record not found error in the log should not be warn levelDowngrade the "record not found" to info or debug levelThe "F...
Gorm Automatically analyze the number of batches in CreateInBatches
2025-01-14 08:39:50
662
Describe the featureI would like the number of batches in CreateInBatch to be automatically set appropriately based on t...
Gorm Change Dialector with dbresolver
2025-01-14 08:39:48
1721
Your QuestionHello, we encountered one use case where we want to change the dialector temporarily with dbresolver along ...
Gorm tx.where()
2025-01-14 08:39:45
875
我在查询mysql的时候 where条件中 只要加上日期条件,就得到下面的报错信息。 code: 48. db::exception: command is not implemented我用别的字段当条件 则没有问题。 tx :...
Gorm Preload nested with reference to parent
2025-01-14 08:39:43
2307
I would like to use preload with reference to the parent, but it seems impossible. So I got something like this, nothing...
Gorm AutoMigrate with Many2Many fails when using UUID for ID
2025-01-14 08:39:40
6677
GORM Playground Linkhttps://github.com/shi-rudo/playground-1https://github.com/go-gorm/playground/pull/474for the sake o...
上一页
下一页
1
…
957
958
959
960
961
…
2246
.