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

Gorm invalid value, should be pointer to struct or slice

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/662DescriptionAfter adding BeforeSave hook, updating mode...

Gorm Many2Many with custom join table gets converted to snake_case when with TableName() function

Your QuestionUnable to set custom many2many table, always gets converted to snake caseThe document you expected this sho...

Gorm 如何全局禁用掉关联表数据的默认写和删除操作

Your Question在我目前的项目里,会需要使用 Preload Joins 这样的方法,但是确实不需要写操作的时候也去处理关联数据,所以我期望能全局禁用掉这个默认或者非默认行为,防止团队成员使用导致非预期错误。经过调研,找到了三种方...

下一页
.