Nineya
Home
Blog
软著申请
Gorm 期望使用Updates函数更新name字段为空,不会触发sql变更
2025-01-15 04:06:51
1720
使用v1.25.9版本,更新db字段失败type Animals struct { Name string `gorm:"column:name"` Age int `gorm:&q...
Gorm what is the diff of gorm tag - and -:all
2025-01-15 04:06:48
2752
what is the diff of gorm tag - and -:allhttps://gorm.io/docs/models.html#Fields-Tagsthe above doc explains the - gorm ta...
Gorm Scan row into multiple structs
2025-01-15 04:06:46
1191
How to scan a row into multiple structsThe document you expected this should be explainedThis code used to work with 1.2...
Gorm gorm(v1.23.2版本) in查询性能慢的问题
2025-01-15 04:06:43
712
gorm 的版本为 gorm.io/gorm v1.23.2使用gorm去查询数据的时候速度很慢,in查询,in中的数量1500,不同的代码方式差异很大,用参数化查询(?占位)和raw直接拼接的方式性能差异巨大,参数化查询的性能很差,请问这...
Gorm Generic function to upsert objects?
2025-01-15 04:06:41
1620
Your QuestionI'm trying to write a generic function to bulk upsert objects in MSSQL and I wanted to check if this looks ...
Gorm ERROR: missing FROM-clause entry for table (SQLSTATE 42P01)
2025-01-15 04:06:39
21571
Your QuestionI want to update data with a has-many relationship, but I receive an error ERROR: missing FROM-clause entry...
Gorm GORM can't convert a model to VALUES sql when calling db.Create from a nested gin handler
2025-01-15 04:06:32
6574
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/612DescriptionCalling DB.Create(&model) in a nested g...
Gorm SQL statement should be stable
2025-01-15 04:06:29
1532
We use below way to generate SQL from GORM:https://stackoverflow.com/questions/66238657/how-can-i-generate-sql-code-from...
Gorm Could you explain to me why you don't report an error when the specified serializer is not found?
2025-01-15 04:06:26
540
Your QuestionI don't think this is a good behaviour:func main(){ var open = gorm.Open("to a PostgreSQL") ...
Gorm 自定义类型使用JSON提示错误:unsupported data type: &[]
2025-01-15 04:06:24
640
Your Question自定义数据类型,在查询的时候提示:[error] unsupported data type: &[],结果是正常的,但是会出现此错误提示。Modeltype PutUser struct { //....
Gorm Omitting a column from the result
2025-01-15 04:06:22
279
Your QuestionI don't want to use "-" to hide a column, because I need to show it almost everywhere. So, how can I exclud...
Gorm Updates 使用 struct 作为参数无法触发 BeforeUpdate 钩子
2025-01-15 04:06:20
17667
Your Question现有结构体:type BaseModel struct { ID uint64 `gorm:"column:id;primaryKey;autoIncrement:true;c...
Gorm Serialization error on update
2025-01-15 04:06:17
2884
Update with serializer:unixtime does not insert timestamps properlyDescriptionHere's my code, the database mysql:8.0.0 f...
Gorm sqlite3 'row value misused' error when preloading a model with composite primary keys and foreign key relations
2025-01-15 04:06:14
5361
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/168DescriptionThere is an issue when loading a model with...
Gorm gorm v2.0 unit testing with sqlmock does not work with Postgres uint
2025-01-15 04:06:11
1217
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/738DescriptionI was reading up the now closed issue for a...
Gorm passing struct address through empty interface cannot be success of Save() & Create() & Delete()
2025-01-15 04:06:09
2052
Your QuestionHello, I want to make a wrapper function for gorm Save/Create/Delete that uses an empty interface.However, ...
Gorm Panic on Bulk Upsert with Pointer Fields in Slice of Interfaces
2025-01-15 04:06:07
2680
Your QuestionI'm trying to pass an slice of interface to the Create method but it returns an error:"unsupported dat...
Gorm Breaking change : define a valid foreign key for relations or implement the Valuer/Scanner interface
2025-01-15 04:06:05
421
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/694DescriptionI am getting the following error Define a v...
Gorm json query with boolean argument fails
2025-01-15 04:06:03
2416
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/729DescriptionWhen querying a property inside a json fiel...
Gorm 请教一个用法
2025-01-15 04:05:58
1423
DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty"`这样配置,omitempty是不生效的,每次查询,json都会多带一个delete_at: null请教,这个有...
上一页
下一页
1
…
920
921
922
923
924
…
2246
.