Gorm Upsert example invalid

DescriptionUpsert / On Conflict documentation is invalidhttps://gorm.io/gen/create.html#Upsert-x2F-On-ConflictHere examp...

Gorm 为什么使用First未查询到数据的时候,框架要打印ERROR日志?

当我使用Gorm作为存储层查询框架时,我通常会使用First来查询我指定的数据,但是我有一个疑问:为什么First在未查询到指定数据的时候会通过Logger输出一个级别为ERROR的日志?这总是会为我带来困扰,因为它会触发我的日志监控告警。...

Gorm Is it possible to turn off getting the last inserted id?

Your QuestionIf returning id is turned off, and the model contains an ID field, lastInsertId will be read by default;eg:...

Gorm UPSERT with RETURNING and WHERE condition returns non modified rows as well while scanning rows

Your QuestionHello!Is there a way to get only modified rows back as result of Upsert query together with RETURNING claus...

Gorm Self-referntial many to many relationship when the field name equals struct name

Your QuestionI appears than using a self-referential many2many relationship over a field name which is equal to the stru...

Gorm Alias for AutoMigrate

Describe the featureHave another alias for AutoMigrate to make it easier to understand what the function does for newcom...

Gorm 设置主键自增字段这点是不是有问题

Comment From: github-actions[bot]The issue has been automatically marked as stale as it missing playground pull request ...

Gorm 请问INSERT INTO在什么情况下不会有ON DUPLICATE KEY出现呢?

tx.Model(model).Create(value)执行的sql是:insert into xxxx ON DUPLICATE KEY UPDATE id=idComment From: github-actions[bot]The ...

Gorm MySQL Parameterized Query execute time too long

When I execute a SQL like:select age from table1 where mobile in (?,?,?......); // about 4k '?' hereThe time for execut...

Gorm How to lazy load relations in a slice of object?

Your QuestionSuppose I have two structs A and B, which are many to many related.Now I have a slice of A []A, how to lazy...

Gorm Duplicate entry when creating an entity in many2many relationship

DescriptionI want to create a many2many relationship between a user and a house. 1. I create the following entities (the...

Gorm Disturbing interface

Redefine the extremely wide used Writer interface does not make the best of the experiences for the developer:type Write...

Gorm How to make batch update using FROM (VALUES) ?

How to write this PostgreSQL query with gorm?UPDATE nodes SET removed_at = _data.removed_atFROM (VALUES ('1bc80b35-c53c-...

Gorm gorm 分页10,10 查询出的数据 与sql查询出来的数据不一样

好几种方式都用过了, 查询结果就是有问题Comment From: github-actions[bot]The issue has been automatically marked as stale as it missing play...

Gorm 1.2.7 breaks migrations when updating 1.2.5

Playground link doesn't make any sense, as I'd need to use multiple versions at once.Say you have the following model:ty...

Gorm Allow modification of null values

Describe the featureAllow me to updates non zero value Motivationmap[string]interface{} is complicated to use when you h...

Gorm Executing count will clear Statement.Joins

https://github.com/go-gorm/playground/pull/736type AB struct { Id int `json:"id" gorm:"primaryKey&quo...

Gorm postgres (SQLSTATE 23505) Error

GORM Playground Linkpalyground linkDescriptionERROR: duplicate key value violates unique constraint "reports_pkey"code:t...

Gorm Security: Redact Database Password from Errors

Describe the featureProvide the ability to hide the database password from logs/error messages. Perhaps as an additional...

Gorm ScanRows doesn't reset fields in target struct for incoming null values

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/686DescriptionStarting with gorm v1.25.1 (v1.25.0 was not...
上一页 下一页
.