Gorm Create with non-zero defaults ignores values being inserted

When a struct has gorm default set to a non-zero value, if the value being created is a zero value, it will be ignored a...

Gorm Field name start with ip prefix is not dominated by gorm

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/502DescriptionPostgreSQL DDLCREATE TABLE example ( ipv...

Gorm db.Create(&orders); if qps 500 create, then "err:commands out of sync. Did you run multiple statements at once?" then add lock it's all right

Your QuestionThe document you expected this should be explainedExpected answerComment From: lxylxy888666done, not gorm e...

Gorm 数据类型对应问题

就是有没有gorm model的type和mysql数据对应的文档Comment From: github-actions[bot]The issue has been automatically marked as stale as it...

Gorm gorm deadlock may occur while initialization config 'SkipDefaultTransaction' set to false(default) and 'PrepareStmt' set to true

Prerequisites: 'PrepareStmt' been set to true while initializing gormwhen 'SkipDefaultTransaction' not set or set to fa...

Gorm db.Unscoped() parsed sub query sql statement is wrong

GORM Playground LinkSorry, no playground pull request here, but i will create a PR when this bug is confirm as a bug, no...

Gorm delete from map

is there a fun to delete data from map?for example:db.table("xxx").where(cond).delete()no need to pass the model ?Commen...

Gorm uniqueIndex and size constraints are broken, at least for sqlite

DescriptionI'm using sqlite and gorm isn't creating the proper length or uniqueness constraints for my models. (I didn't...

Gorm Primary key can't be created if specify index as well

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/497DescriptionWhen I do many2many relation, sometimes you...

Gorm [Feature] 动态多数据切换

Describe the feature需要一个可以实时切换db的功能Motivation在sass服务中每个用户不同的db,可能是动态创建的 DBResolver 没有解决这个问题,维护一个"/"路径连接,使用orm进行操作的时候指定db...

Gorm Updates operation becomes too slow after updating from 1.9 to 1.22

Your Question** init ****version-1.9:dbClient, err := gorm.Open("mysql", dsn)version-1.22:dbClient, err := gorm.Open(mys...

Gorm 创建时,如果包含设置了 Serializer 并且为空的值,会报错

复现方法:在测试 TestSerializer 中 106行加下面的代码data.JobInfo = Job{}tests/serializer_test.go:106Create 方法将会报错: serializer_test.go:10...

Gorm update the same field

Comment From: xujiaxindudusorry,i found the answer in your Documentationbest regardsComment From: github-actions[bot]The...

Gorm Log only parameterized SQL statements without any values

I'm logging this as a bug because it's a security problem.DescriptionThis was mentioned in https://github.com/go-gorm/go...

Gorm Associated records are not created with default values

DescriptionWhen creating a record with associations, only the top level record is created if all the associated records ...

Gorm ERROR: ON CONFLICT DO UPDATE command cannot affect row a second time (SQLSTATE 21000)

Hi guys, today I am testing gorm (gorm.io/gorm v1.23.8 // indirect) upsert and getting this error below. Is this fixed a...

Gorm the primary key not rewrited to entity after inserting

DescriptionInteresting, when I defined a entity struct using a nested id module, which tagged with gorm:"embedded", afte...

Gorm 关于嵌套查询,preload后过滤条件的问题

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Description`type User struct { gorm.Model Name st...

Gorm Text search with gorm

Hello,How can I make a text search with go? I try with this code but not thing happenname := "Any Name"tx := a...

Gorm Does GORM have a way to do a migration dry run / check if DB needs any changes?

Does GORM have a way to do a migration dry run / check if DB needs any changes?Should be answered on migration docs page...
上一页 下一页
.