Gorm gorm 使用db.Create() 时候,sql过长报错invalid connection

gorm 使用db.Create() 时候,sql过长报错invalid connection具体报错如下:[mysql] 2022/10/10 16:10:53 packets.go:174: write tcp 192.168.1....

Gorm when i use function .Model(), how to set the table alias before i need join other tables??

when i use function .Model(), how to set the table alias before i need join other tables??Comment From: github-actions[b...

Gorm Prepared statement contains too many placeholders in Preload

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/450Descriptionerror when preloading large dataset in mysq...

Gorm db.Model.Count return error value

gorm version : v1.20.11golang version : 1.17Comment From: github-actions[bot]The issue has been automatically marked as ...

Gorm 使用Create方法批量插入模型(结构体类型)时,若使用了Upsert 处理冲突,执行后,结构体列表中每个元素自动补充的自增主键的值可能是错的

注:这种情况发生在 批量插入的列表数据中有些记录在数据库中已存在,并且会执行更新操作参考 https://dev.mysql.com/doc/refman/5.7/en/mysql-affected-rows.htmlComment Fro...

Gorm Parsing Stringarray returned by SQL

I have a sql like thisSELECT project_group.id,name,code,JSON_ARRAYAGG(permission_tag) as permission FROM `project_group`...

Gorm AutoMigrate should add unique constraint

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/285DescriptionWhen a user wants to add a unique constrain...

Gorm No autoincrement for serial column

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/439DescriptionUpgrading from gorm v1.22.5 columns of type...

Gorm Replace associations not working as expected

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/264DescriptionIt looks like the association replace funct...

Gorm 新手问题,关联其他数据表的操作。

我的数据结构这样的type Player struct { ID uint `gorm:"primary_key;AUTO_INCREMENT"` Name string `gorm:"...

Gorm db.Model.Updates panics when using struct instead of map[string]interface{}

Simple ReproductionFull source: https://github.com/superhawk610/gorm-updates-bug/blob/main/main.goHere's the important b...

Gorm updates cannot use 'type KVStore map[string]interface{}'

Your Questiontype KVStore map[string]interface{}db.updates(KVStore{"key": 1})it report an error: "unsupported data", The...

Gorm 自增主键的 AutoIncrementIncrement 的值可以直接从数据库获取吗?

Describe the feature目前自增主键的 AutoIncrementIncrement 的值需要在数据库对象 struct tag 中通过 autoIncrementIncrement 指定。希望可以直接从数据库获取 Auto...

Gorm gen生成的代码,可以不定条件查询吗?

使用gorm是可以这样的:当使用struct查询时,GORM只对非零字段进行查询,也就是说如果你的字段的值是0,'',false或其他零值,它将不会被用来建立查询条件。如果我使用gen的写法支持吗?Comment From: github-...

Gorm Update("col_1 = ?", col1).Update("col_2 = ?", col2) does not work after upgrade version from 1.23.8 to 1.23.10

Since upgrading gorm version from 1.23.8 to 1.23.10 ChangelogUpdating using pattern: db.Model(MyTable{}).Update("col_1 =...

Gorm Joins preloading ignores select and omit clauses

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/530DescriptionDespite what the docs says, it is not possi...

Gorm Has Many Association only insert one row since v.1.22.5

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/527DescriptionThere are some related issues but issue sti...

Gorm The result of gorm is different from mysql client

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Descriptiongorm versiongo 1.16require ( gorm.io/drive...

Gorm Polymorphism belongs to

Polymorphism belongs toHello, I try to have a polymorphic relation like that:TicketMessage struct { SenderType stri...

Gorm "DISTINCT ON" Count ivalid

Sorry, issue without playground link, but bug is simpleDescriptionI have distinct on sql query:db.Table("<table&...
上一页 下一页
.