Gorm create in batch On Conflict got error instance

Descriptionthe same question:https://github.com/go-gorm/gorm/issues/5754https://github.com/go-gorm/gorm/issues/3810My ex...

Gorm 关联删除可以递归吗

type Class struct { Stus []*Score gorm:"foreignKey:StuID"}type Stu struct { StuID int64 Scores []*Score gorm:"f...

Gorm The return values of the framework and the results of MySQL's internal command-line execution are inconsistent.

Challenges encountered when using Sharding-Proxy for database sharding and table partitioningscreenshot:result:gorm retu...

Gorm Running AutoMigrate concurrently on the same model fails with various race conditions

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/651DescriptionWhen AutoMigrate is called concurrently fro...

Gorm how to Execute multi update sql ?

sql = `update chapters set parent_id=112812 where id=112770; update chapters set parent_id=112766 where id=112771;`er...

Gorm many2many doesn't work if one table has its key marked as readonly

GORM Playground LinkAbsolutely not.Descriptiontype ATable struct { ID int32 `gorm:"->;primaryKey"` Name s...

Gorm Production ready Database migration management (Make AutoMigrate production suitable)

Describe the featureExtend AutoMigrate to scan Schema/Model changes, generate SQL migration scripts automatically, and w...

Gorm CreateInBatches with []map[string]interface, If the key contains a 【.】 , then the insertion error will be reported

DescriptionWhen I use SQLite as the engine and use CreateInBatch to dynamically insert table data, I specify values as [...

Gorm The result of FindInBatches is incorrect when used with order.

DescriptionI'm not sure that is a bug. Now I have a table and the primary key is ip. I want to do batch execution in the...

Gorm Plugin to detect and/or prevent re-use of an instance/sesssion

Describe the featureA plugin which detects when a db instance is being re-used for multiple finalizer methods. The plug...

Gorm use create() batch insert have error

Your QuestionI have a large array that needs to be inserted into mysql, so I wrote a function, passing the array as a pa...

Gorm How to save nest model and nest array and what is best practice

Your QuestionI have model like type Rect struct { X1 float64 `json:"x1"` Y1 float64 `json:"...

Gorm 并发场景下,使用raw方法执行sql会报错expected 2 arguments, got 4; invalid value, should be pointer to struct or slice;

.Raw("select sum(points) as cnt from xx where task_id in ? ", taskIDList).Find(&sum).ErrorComment From: github-actio...

Gorm The model parameter didn't make conditions

Your QuestionWhen I passed an object assigned 10 to its primary key ID, the sql generated is not added condition.Code:t...

Gorm 如何控制不调用常量的String?

`type BalanceLogType uint8const ( BalanceLogTypeTest BalanceLogType = 1 // 测试)func (a BalanceLogType) String() string...

Gorm gorm gen remove SetDefault

type ServiceContext struct { Config config.Config Dao *do.Query}func NewServiceContext(c config.Config) (*ServiceC...

Gorm How to handle conflict clause in association upsert?

Context and questionI'm using Gorm v1 in my project and I'm currently migrating from the v1 to the v2 (v1.20.2). I've mi...

Gorm Where(User{Name:"name"}) results in "where pets.name='name'"

I'm not sure if this is a bug in gorm or just missing from documentation for breaking changes between gorm v1 and v2. Th...

Gorm 更新到最新版本后,使用Gen Guides项目就无法启动项目

出现问题无法正常启动项目的版本gorm.io/datatypes v1.2.0gorm.io/gen v0.3.23gorm.io/gorm v1.25.5gorm.io/plugin/dbresolver v1.4.7gorm.io/dr...

Gorm commands out of sync. You can't run this command now

Your QuestionSometimes it happens:1. commands out of sync. You can't run this command now2. busy buffergo version:go1.16...
上一页 下一页
.