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...

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...

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 > ...

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 ...

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...

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/...

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...

Gorm PostgreSQL does not return expected timezone

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/790DescriptionWith the database server configured for UTC...

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...

Gorm Unable to use netip.Addr in models

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/786DescriptionSince (if I understand correctly) GORM uses...

Gorm BeforeFind

Describe the featureCreate a BeforeFind hook along the same lines as the other Before hooks, but for Find.MotivationWe a...

Gorm 设置 RaiseErrorOnNotFound 不生效

版本:v1.25.12参考 #6105 中的方法进行设置后,使用 Find 查询依然无法触发 ErrRecordNotFound 错误 gormDB, err := gorm.Open(mysql.New(mysql.Conf...

Gorm 如果构建一个ifnull(表1.字段,表2.字段)表达式

Your Question在left join中,获取字段,需要实现ifnull(表1.字段,表2.字段)功能,但是目前只有ifnull()函数,指定具体数值,如何实现本功能?The document you expected this s...

Gorm 如果构建动态复杂查询语句

Your Question检索条件 左侧分类 and (名称 or 编码 or 型号) ,如果名称、编码、型号有任意值,在构建检索条件,否则不进行检索,这样动态的查询语句如果构建?如可能会出现如下情况:分类=90 and (名称 li...

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...

Gorm Deadlock on sqlite with PrepareStmt = true

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/783DescriptionRequirements:- using sqlite- setting sqlDB....

Gorm Sqlite 在执行AutoMigration时候,如果tag中指定了索引名称,会导致不同表执行生成同样的索引名称然后报错

example: https://github.com/go-gorm/playground/pull/782package maintype Order struct { ID uint64 `gorm:"col...

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...

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]...

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...

下一页
.