Nineya
Home
Blog
Gorm *string and *int cause left join not to return nil
2025-01-15 04:27:03
3021
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/781DescriptionI have two model structs. When I combine th...
Gorm Why is there an extra insert query running for updating Many to Many field updates?
2025-01-15 04:27:01
2938
Why is there an extra insert query running for updating Many to Many field updates? [check the second last INSERT query]...
Gorm Why update by map do not run Value() (driver.Value, error)
2025-01-15 04:26:58
689
Why update by map do not run Value() (driver.Value, error) function?db.create() will run the function.Comment From: gith...
Gorm invalid value, should be pointer to struct or slice
2025-01-15 04:26:55
2090
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/662DescriptionAfter adding BeforeSave hook, updating mode...
Gorm Many2Many with custom join table gets converted to snake_case when with TableName() function
2025-01-15 04:26:53
2090
Your QuestionUnable to set custom many2many table, always gets converted to snake caseThe document you expected this sho...
Gorm 如何全局禁用掉关联表数据的默认写和删除操作
2025-01-15 04:26:50
1483
Your Question在我目前的项目里,会需要使用 Preload Joins 这样的方法,但是确实不需要写操作的时候也去处理关联数据,所以我期望能全局禁用掉这个默认或者非默认行为,防止团队成员使用导致非预期错误。经过调研,找到了三种方...
Gorm gorm forces it's own primary key when i want to use my own
2025-01-15 04:26:48
2846
Example:type Trigger struct { Base}type Base struct { ID string `gorm:"primaryKey;autoIncrement:fal...
Gorm Using only offset instead of limit
2025-01-15 04:26:45
806
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
2025-01-15 04:26:42
1384
Describe the featureIn callbacks.go you can find the processor.Execute implementation. Within it, this code: if stmt.SQ...
Gorm IndexOption的priority字段是小写,包外无法访问
2025-01-15 04:26:40
745
我们现在有自己开发数据库驱动的需求,在实现index时候,发现priority小写,导致联合索引的排序在包外无法实现。index相关的字段,除了priority其他所有字段都为大写,包外可访问,此字段是否改为大写Comment From: ...
Gorm id 字段被强制设置成主键问题
2025-01-15 04:26:34
1053
Your Question表中有一个 id 字段,我并不想将它设置为主键,因此,我设置了 primaryKey:false,但是不起作用。type Test struct { ID int64 `gorm:"autoInc...
Gorm parseDDL cannot process fields properly
2025-01-15 04:26:31
1433
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
2025-01-15 04:26:23
1102
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.
2025-01-15 04:26:21
3561
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
2025-01-15 04:26:18
1188
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可能造成的异常情况
2025-01-15 04:26:15
2726
Postgres数据库中DSN设置timezone和TimeZone可能造成的异常情况package mainimport ( "fmt" "gorm.io/driver/postgres"...
Gorm RETURNING clause doesn't generate corresponding SQL
2025-01-15 04:26:13
3367
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.
2025-01-15 04:26:10
3467
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
2025-01-15 04:26:07
4044
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?
2025-01-15 04:26:05
2921
go version: go1.14.1 darwin/amd64Server version: 10.3.17-MariaDB MariaDB Serverpackage mainimport ( "github.com/...
上一页
下一页
1
2
3
4
5
6
7
…
1344