Nineya
Home
Blog
软著申请
Gorm db.Save creates record even when it has its primary key set
2025-01-14 16:57:57
1244
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/166DescriptionPer documentation, Save should insert a rec...
Gorm Is it possible to add two values in an OnConflict clause in GORM?
2025-01-14 16:57:54
409
Your QuestionLooking to do something likeINSERT INTO `table` (...) VALUES (...) ON DUPLICATE KEY UPDATE `points`=`points...
Gorm 用tag指定数据库字段为int类型的字段默认值时,create函数生成的sql语句多了一列
2025-01-14 16:57:49
4812
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionComment From: github-actions[bot]The issue ha...
Gorm Create/Save failed with default values
2025-01-14 16:57:46
2919
Regard to #5538, clarify testing below:func TestIssue5538(t *testing.T) { type Policy struct { gorm.Model ...
Gorm Panic when using gorm many2many relationship with model that uses go generics
2025-01-14 16:57:44
887
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/618DescriptionAlthough gorm is based on Go 1.16 it appear...
Gorm Is gorm still maintained?
2025-01-14 16:57:42
581
Is gorm still maintained? Why don't many of the many table query questions about many2many mentioned above have a best a...
Gorm big bug
2025-01-14 16:57:39
1438
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionComment From: xiyang-2023Scopes v1.25.1 is no...
Gorm references happend Error
2025-01-14 16:57:36
3933
Your Questionpackage mainimport ( "gorm.io/driver/mysql" "gorm.io/gorm")type User struct { ...
Gorm open sqlite fail,need close?
2025-01-14 16:57:31
341
Your Questionopen sqlite fail,need close?gorm.Open sqlite failed,error is 'got error unable to open database file: not a...
Gorm order by id asc 取最新问题
2025-01-14 16:57:28
683
Your Question如题,我司将 mysql 数据库当了时序数据用,数据简化结构包含了 id(自增主键,int),deviceID(设备ID,varchar(255)), value(值,varchar(255)),createTim...
Gorm [MSSQL] Can't insert when there is a trigger on the table
2025-01-14 16:57:23
2224
Your QuestionI'm trying to insert some values using the Create functions but, since there's an indication about the Prim...
Gorm Only log write queries (e.g. CREATE, UPDATE, DELETE)
2025-01-14 16:57:20
773
Your QuestionIs there a way to only log certain queries? In particular, I only want the logger to log statements that mo...
Gorm tidb 开启事务耗时近1s
2025-01-14 16:57:17
981
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Descriptioncode: log.Infof(ctx, "timeConsuming before, t...
Gorm How to query a many2many relationship with a Where clause on the association?
2025-01-14 16:57:15
4489
Your QuestionI have the following entities:type User struct { ID string Name string Groups []Group `gorm:"...
Gorm 事务提交有延迟?
2025-01-14 16:57:12
338
我在调用Commit之后,同一秒执行select还是没查询到commit提交的插入数据的事务,要过一下下,这个是不是异步操作的?Comment From: w1ndyz我在调用Commit之后,同一秒执行select还是没查询到commit...
Gorm panic: runtime error: invalid memory address or nil pointer dereference
2025-01-14 16:57:09
1835
At v1.25.1 version, The wrong dns will painc.gorm.Open( mysql.New(mysql.Config{ DSN: "test", }),)...
Gorm need close?
2025-01-14 16:57:07
753
gorm.Open sqlite failed,error is 'got error unable to open database file: not a directory'Do you need to call the closin...
Gorm automigrate with many2many is easy to make mistakes #615
2025-01-14 16:57:04
1252
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/615Description所有的信息都在上面的那个pr中,其中最主要的就是以下代码:func TestGORM(...
Gorm Not auto migrate primaryKey for sqlite
2025-01-14 16:57:02
1632
I added a column to the primary key, but the automatic migration did not take effect.befortype ComicViewLog struct { ...
Gorm [gorm >= 1.25] save() is successfully applied with a record that has a foreign key soft deleted
2025-01-14 16:57:00
1149
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/610DescriptionThis bug is happening only on gorm >= 1....
上一页
下一页
1
…
950
951
952
953
954
…
2246
.