Gorm gorm 1.25.1 版本,当表结构发生变更时,调用AutoMigrate方法时出现报错:got 1 parameters but the statement requires 0

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionComment From: github-actions[bot]The issue ha...

Gorm 针对下列复杂SQL查询,GORM怎么处理?

这是从Java项目mapper.xml文件中获取得的,如果用转换为GORM?` SELECT ta.* FROM sys_dictionary_data ta LE...

Gorm “删除关联”无法正常工作

下面是根据 https://gorm.io/docs/associations.html#Delete-Associations 写的程序,想要在删除User时同时删除其Company关联,但是不成功。不确定是 docs 有误还是Delet...

Gorm the db.Save bug

hellopackage mainimport ( "fmt" "gorm.io/driver/postgres" "gorm.io/gorm")func mai...

Gorm Support go1.23 iterators

Describe the featureAllow to pass iterators in methods:db.Delete(&User, "name IN (?)", maps.Keys(namesToI...

Gorm How to check if error type is DUPLICATE KEY

Your QuestionI have unique index key and when i try to insert duplicate record i get this error ERROR: duplicate key val...

Gorm AfterUpdate/AfterSave missing data?

Your QuestionIs it expected that the data in the AfterUpdate/AfterSave hooks only have the changed fields? I'm looking t...

Gorm Wrong Foreign Key AutoMigrate default value

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/758DescriptionI'm using a Postgres database with primary ...

Gorm Context management in GORM

Your QuestionI've encountered a situation where I need to accurately detect the connection status of a database using GO...

Gorm How to achieve self-join in a table without foreign keys?

Your QuestionI have a table below without foreign keys. I would like to perform a self-join query to retrieve the data o...

Gorm Broken backward compatibility with joins and preload

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/749DescriptionStarting from v1.25.7, gorm is having troub...

Gorm Can't get data in After/BeforeDelete hooks

I defined a struct:type BookEntity struct { ID int64 `json:"id" gorm:"primaryKey,autoIncrement"` ...

Gorm Can soft delete specify a delId field that is set to the value of id instead of creation time to avoid deletion conflicts?

Describe the featureThe feature request is to enhance the soft delete functionality by allowing the specification of a d...

Gorm Postgres hopes to add string.agg to replace GroupConcat

Describe the featureDescribe the featurecount, err := qu.WithContext(ctx). Select( qu.UID, ...

Gorm postgres ScanByPage reports an error using group

Your Questioncount, err := qu.WithContext(ctx).Select(qu.UID,qu.Name,qu.Avatar,qu.PhoneNumber,qu.Email,qu.Gender,qu.Birt...

Gorm ScanByPage reports an error using group

count, err := qu.WithContext(ctx). Select( qu.UID, qu.Name, qu.Avatar, ...

Gorm ScanByPage reports an error using group

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Descriptioncount, err := qu.WithContext(ctx).Select(qu.U...

Gorm BUG:PrepareStmt:true 在 SQL 执行时错误 PreparedSQL 会内存泄露

BUG 原因开启预编译后,gorm (db *PreparedStmtDB) prepare 会拿预编译语句先到 stmts 查找是否存在预编译 (stmt) 对象,有则直接返回 stmt 对象,无则缓存预编译对象,再缓存预编译语句,(db...

Gorm The Exec function does not accept parameters in the form of a slice

tx.Exec("CREATE VIEW myview AS SELECT * FROM licenses WHERE status IN ?", []string{"ACTIVE", "I...

Gorm The foreign key not ending with "ID" cannot preload data normally.

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Descriptiontable t_userCREATE TABLE `t_user` ( `id` int...
上一页 下一页
.