Nineya
Home
Blog
Gorm ERROR: invalid input syntax for type json (SQLSTATE 22P02)
DescriptionDB: PostgreSQL 16.0.Table "user" with field "props" as jsonb type.Example value: {"access": {"project": [3, 6...
2025-03-17 14:01:29
1010
Gorm Upgrade from 1.25.6 to 1.25.7 (and above) : argument do not match
Your QuestionDescriptionHello Team,In1.25.6, this work without issue query := db. Where("Hash = ? AND exp...
2025-03-15 14:03:44
483
Gorm Upgrade from Gorm 1.25.6 to 1.25.7 (and above) generate arguments do not match
DescriptionHello Team,In1.25.6, this work without issue query := db. Where("Hash = ? AND expires_at > ...
2025-03-15 14:03:36
1394
Gorm RowsAffected is incorrect on subsequent updates on mysql
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/793DescriptionExecute an update Exec against a supported ...
2025-03-12 14:08:44
7698
Gorm Batch Create on sqlite causes a panic if a *map[string]interface{} is passed a parameter to Create
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/795DescriptionBatch Creates on sqlite causes a panic if a...
2025-03-12 14:08:28
177
Gorm JSONArrayQuery when contains a slice (in golang), which created extra parentheses
GORM Playground Linkhttps://github.com/gwsee/golang-example/blob/main/main.gohttps://github.com/go-gorm/playground/pull/...
2025-03-03 14:02:30
1194
Gorm JSONArrayQuery when contains a slice (in golang), which created extra parentheses
https://github.com/gwsee/golang-example/blob/main/main.goDescriptionthe mysql column area type is json;here is a simpl...
2025-03-03 14:02:18
1173
Gorm PostgreSQL does not return expected timezone
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/790DescriptionWith the database server configured for UTC...
2025-03-01 14:03:31
590
Gorm Creating multiple objects referencing a shared object results in that object getting created multiple times
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/788DescriptionI use the terms from the playground to expl...
2025-02-04 14:08:28
1492
Gorm Unable to use netip.Addr in models
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/786DescriptionSince (if I understand correctly) GORM uses...
2025-01-26 14:01:08
916
Gorm BeforeFind
Describe the featureCreate a BeforeFind hook along the same lines as the other Before hooks, but for Find.MotivationWe a...
2025-01-25 14:01:56
497
Gorm 设置 RaiseErrorOnNotFound 不生效
版本:v1.25.12参考 #6105 中的方法进行设置后,使用 Find 查询依然无法触发 ErrRecordNotFound 错误 gormDB, err := gorm.Open(mysql.New(mysql.Conf...
2025-01-23 14:03:36
2256
Gorm 如果构建一个ifnull(表1.字段,表2.字段)表达式
Your Question在left join中,获取字段,需要实现ifnull(表1.字段,表2.字段)功能,但是目前只有ifnull()函数,指定具体数值,如何实现本功能?The document you expected this s...
2025-01-23 14:03:30
196
Gorm 如果构建动态复杂查询语句
Your Question检索条件 左侧分类 and (名称 or 编码 or 型号) ,如果名称、编码、型号有任意值,在构建检索条件,否则不进行检索,这样动态的查询语句如果构建?如可能会出现如下情况:分类=90 and (名称 li...
2025-01-23 14:03:24
288
Gorm Where builder not wrapping parentheses around multiline string clauses
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/784DescriptionAt some point in the last few releases, I t...
2025-01-23 14:03:09
694
Gorm Deadlock on sqlite with PrepareStmt = true
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/783DescriptionRequirements:- using sqlite- setting sqlDB....
2025-01-23 14:03:03
641
Gorm Sqlite 在执行AutoMigration时候,如果tag中指定了索引名称,会导致不同表执行生成同样的索引名称然后报错
example: https://github.com/go-gorm/playground/pull/782package maintype Order struct { ID uint64 `gorm:"col...
2025-01-16 16:48:38
1751
Gorm *string and *int cause left join not to return nil
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/781DescriptionI have two model structs. When I combine th...
2025-01-15 04:27:03
3021
Gorm Why is there an extra insert query running for updating Many to Many field updates?
Why is there an extra insert query running for updating Many to Many field updates? [check the second last INSERT query]...
2025-01-15 04:27:01
2938
Gorm Why update by map do not run Value() (driver.Value, error)
Why update by map do not run Value() (driver.Value, error) function?db.create() will run the function.Comment From: gith...
2025-01-15 04:26:58
689
上一页
下一页
1
2
3
4
5
6
7
…
101
.