Gorm gorm forces it's own primary key when i want to use my own

Example:type Trigger struct { Base}type Base struct { ID string `gorm:"primaryKey;autoIncrement:fal...

Gorm Using only offset instead of limit

Your QuestionWhen I use offset but not limit, the SQL executed by Gorm only includes offset and not limit. Unfortunately...

Gorm Enhance db.Scan with ParamsFilter

Describe the featureIn callbacks.go you can find the processor.Execute implementation. Within it, this code: if stmt.SQ...

Gorm IndexOption的priority字段是小写,包外无法访问

我们现在有自己开发数据库驱动的需求,在实现index时候,发现priority小写,导致联合索引的排序在包外无法实现。index相关的字段,除了priority其他所有字段都为大写,包外可访问,此字段是否改为大写Comment From: ...

Gorm id 字段被强制设置成主键问题

Your Question表中有一个 id 字段,我并不想将它设置为主键,因此,我设置了 primaryKey:false,但是不起作用。type Test struct { ID int64 `gorm:"autoInc...

Gorm parseDDL cannot process fields properly

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/780DescriptionI'm using SQLiteI wasn't using GORM before,...

Gorm Find with interface does not work

Your QuestionWhen using Find with a value which is of type any or interface{}, the slice does not get filled with the re...

Gorm Statement.table has a BUG.

GORM Playground LinkDescriptionStatement.table. If it exists and is an unexpected value, it may cause the query to ...

Gorm [Proposal] Monitor gorm with https://github.com/alibaba/opentelemetry-go-auto-instrumentation

I found that gorm doesn't have the ability to integrate tracing and metrics by default and there doesn't seem to be a be...

Gorm Postgres数据库DSN设置TimeZone可能造成的异常情况

Postgres数据库中DSN设置timezone和TimeZone可能造成的异常情况package mainimport ( "fmt" "gorm.io/driver/postgres&quot...

Gorm RETURNING clause doesn't generate corresponding SQL

Your QuestionAdding clause.Returning{} with the return columns specified has no effect does not add a RETURNING clause t...

Gorm Updates cant auto set updated_at when strcut dont have Updated_at field.

GORM Playground Link[<!--To ensure your issue be handled, the issue MUST include a GORM Playground Pull Request Link ...

Gorm Using a similar model to map but preload is wrong

First, I have the Post model, which has been migrated to the database:type Post struct { ID uuid.UUID ...

Gorm Error: Commands out of sync. Did you run multiple statements at once?

go version: go1.14.1 darwin/amd64Server version: 10.3.17-MariaDB MariaDB Serverpackage mainimport ( "github.com/...

Gorm Model Fields with *[]byte Are Not Set to NULL When Assigned nil

DescriptionWhen attempting to set a *[]byte field to nil in the database, GORM does not update the field to NULL as expe...

Gorm Inconsistent Execution Time for Same SQL Query

Issue:When executing the same SQL query multiple times, the completion timestamps vary significantly. Even though the qu...

Gorm why where condition is not in effect when I use Session()

Your Questionfirst, my codes like thisfunc main() { var data map[string]any DB := simdb.InitGormMysql(dbConfig) ...

Gorm 泛型支持

Your Questiongolang 1.18 泛型beta版已出,请问何时发布 gorm 3.0Expected answer跟随golang1.18发布Comment From: FlameMida只能说期待了Comment From...

Gorm Support for PostgreSQL Index Operator Classes in GORM

Describe the featureI would like to request support for PostgreSQL index operator classes in GORM. Specifically, I need ...

Gorm Preloaded association goes away when replacing with Omit

GORM Playground LinkThe issue is so trivial that (I think) a playground link is not required here.The issue:Preloaded as...
上一页 下一页
.