Gorm MYSQL多字段联合IN用法

像这种语句该怎么拼接呢select * from table_name where (field_1 , field_2) in(("a1", "b1"), ("a2", "b2"));The document you expected t...

Gorm How to omit column in preload?

Your QuestionI want to full load this invoice but I need to omit some column in preload that I want to hide to a paticul...

Gorm Gorm resolves an Object which should be nil with an unrelated other one

Reproduction given in #519 AND #520(simpler)DescriptionThis Bug occurs in go v1.23.10 with postgres v1.3.10.The Bug does...

Gorm 希望支持 指针表字段形式查询,无需再担心表字段 写错或重命名

Describe the feature希望支持 指针表字段形式查询,无需再担心表字段 写错或重命名例如 query.Where(&person.Id, 123).Where(&person.Name, "张三")Motiv...

Gorm 想知道gorm是怎么把查询结果序列化到查询结构体中

Your QuestionThe document you expected this should be explainedExpected answerComment From: black-06By reflection. https...

Gorm Lost indexes on SQLite table rewrite when adding FK

DescriptionWhen adding FK to existing SQLite table, table is rewritten with FK added but existing indexes are not recrea...

Gorm Error in generation groups queries in scopes

GORM Playground Linkhttps://github.com/daashuun/playgroundDescriptionI tried to makeSELECT * FROM "test" WHERE a = 1 AND...

Gorm 多对多关系对着文档探索了好几年还是无法正确使用,真的是糟糕的一个orm

多对多模型关系的crud(包括关联的数据)对着文档探索了好几年还是无法正确使用,真的是糟糕的一个orm比如从“db.Session(&gorm.Session{FullSaveAssociations: true}).Updates...

Gorm supports batch insertion of any model

codevar dataList []anym1 := model.Province{}m1.Code = 65m1.Name = "新疆维吾尔自治区"dataList = append(dataList, m1)m2 ...

Gorm Schema based multi-tenancy

Your QuestionSchema based multi-tenancyDoes GORM support schema based multi-tenancy? https://sultanov.dev/blog/schema-ba...

Gorm Correct conversion of type aliases

Your QuestionI an using this code. The generated sql is SELECT * FROM `modules` WHERE status="1" ORDER BY `modules`.`sta...

Gorm Hook is not called for associations

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/266DescriptionHi, i'm trying to get rid of orphans for as...

Gorm How can I use ForceIndex with Join

Your QuestionWhen using ForceIndexhint with Join table, there is a syntx error in SQL.go code like:d.db.Debug().Clauses(...

Gorm GORM gives inconsistent execution time for me

I have a simple search query in a table with 2 million recordsSELECT"products"."id","products"."active","products"."titl...

Gorm Preload: log tracking time is not the actual execution time of sql

不加Preload,查询时间为20ms,加上Preload之后,查询时间达到40-70ms,我使用的是空数据库,仅两个字段,加上Preload,性能直接大幅度降低Without preload, the query time is 20ms...

Gorm 如何把错误信息写入日志?

现在的错误信息输出到控制台,要怎么写入到文件呢用的最新的v2版本// logrusLog = logrus.New()//Log.MaxLog.Out = ioutil.DiscardLog.SetReportCaller(true)Log...

Gorm Where clauses show up as nil in Scopes

GORM Playground Linkhttps://github.com/acidjazz/playground specific failure is hereDescriptionsay i have this scopefunc ...

Gorm Where clauses are nil inside scopes

say I have a scope:func Paginate() func (db *gorm.DB) *gorm.DB { return func(db *gorm.DB) *gorm.DB { instance := db....

Gorm Is Oracle supported?

Your QuestionIs Oracle supported?Comment From: a631807682refer to https://github.com/CengSin/oracle

Gorm bug:gorm scan func not capture error driver:clickhouse

[GORM Playground Link](https://github.com/go-gorm/playground/pull/591)https://github.com/go-gorm/playground/pull/591I qu...
上一页 下一页
.