Gorm Can you add to the Gorm V2 migrate guide that sql tags are no longer supported?

Just as confirmed in https://github.com/go-gorm/gorm/issues/4376.Can you please add that to the gorm v2 migrate guide, p...

Gorm Migrator Panic at Polymorphic Relationship and no PK

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/434DescriptionPanic caused by a table with no PK and a po...

Gorm Delete method creates double params

Descriptiongorm: v1.22.5; not happen in v1.22.4mysql=> AND user_invitations.id=== RUN TestDeleteUserInvitation2022/...

Gorm Is there a particular reason gorm doesn't support, natively, handwritten migrations?

Your QuestionI was wondering if there a reason why gorm doesn't support running handwritten migration files. Obviously a...

Gorm 请求支持tdengine标准sql部部分

https://www.taosdata.com/cn/Describe the featuretdegine兼容sql, 有一些特殊的操作可以通过execute 单独执行.请求支持标准sql部分,比如 mapper映射,初始化结构之类的M...

Gorm Access tables not created through gorm with gorm model

Your QuestionI want to have more granular control of my migrations, so I'm writing separate sql files and I run those th...

Gorm AutoMigrate: uniqueIndex creates no index

version: 1.22.5; mysqlDescriptionPlatformId string `gorm:"uniqueIndex,size:256,not null"`P...

Gorm Simple custom type that worked in v1 stopped in v2

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/419DescriptionI had a pretty simple custom type in GORM 1...

Gorm How to change db connection when use db resolver and tx

在db resolver中定义了多数据库的链接配置,但在使用事物的时候无法使用db resolver中配置的数据库,只能用默认的数据库进行事物操作The document you expected this should be explai...

Gorm Issue with dynamic where query

Getting issue while making dynamic query for where clauseMy dynamic query string is like thiswhere("table1.col1 = ? AND ...

Gorm How to set dynamic column name in order function in gorm ?

Suppose my table name is A.I want to sort the table records on basis of column come from request.How should i write this...

Gorm Not Scanning into arrays

Descriptioni am using Scan to map ids to []int array. But it always populate null values but the row count is coming out...

Gorm db.CommonDB() no longer works in gorm v2.

db.CommonDB() no longer works in gorm v2.if tx, ok := DB.CommonDB().(*sql.Tx) ; ok {...}can't work.Any alternative way t...

Gorm 关于 Postgresql 和 Go time.Time 的时区问题

Your Question// PG 连接使用的时区参数,PG 使用的是 UTCTimeZone=Asia/Shanghai// Modeltype User struct { ID int64 ...

Gorm How to only append valid associations?

How to only append valid associations?Append-AssociationsAs described in association mode, we need to Append relations, ...

Gorm Nested Preload loading incorrect data into model

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/423DescriptionI would like to preload a nested field from...

Gorm db.Session set PrepareStmt: false is invalid

Your Questiondb, err := gorm.Open(mysql.Open(dsn), &gorm.Config{ PrepareStmt: true, })newDb := db.Session(&go...

Gorm 随机取出15条数据使用gorm应该怎么写

Your QuestionThe document you expected this should be explainedExpected answerComment From: li-jin-gouhello @steve7688 f...

Gorm Scopes that use subqueries generate invalid SQL

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/431DescriptionWhen using a scope that defines a subquery,...

Gorm different SQL using Scopes()

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/430DescriptionThe same execution via Scopes() gives diffe...
上一页 下一页
.