Nineya
Home
Blog
软著申请
Gorm How to enforce hooks on every query?
2025-01-15 04:24:33
591
Your QuestionI have a BaseModel that has a GetDefaultFilters method. All my models implement BaseModel. GetDefaultFilter...
Gorm fatal error: concurrent map writes in "parseRelation" function
2025-01-15 04:24:31
3290
We found that two tables, both associated with the same table, were called at the same time when the program was started...
Gorm AutoMigrate函数迁移sqlite数据库表失败
2025-01-15 04:24:28
4403
GORM Playground Linkhttps://github.com/go-gorm/gorm/releases/tag/v1.25.12Description1.已经存在了一个sqlite3数据库,表结构已经通过sql语句被建立好...
Gorm *gorm.DB和*query.Query混合使用的最佳实践
2025-01-15 04:24:26
489
Your Question两者的文档都看过,gen的文档主要在于演示对于原生gorm的封装,展示各种便利性,并没有体现两者之间混合使用的场景。一个实际的场景是:最初使用了gorm,后来渐进式使用gen替换一部分gorm,两者共同存在。另外的...
Gorm Duplicate savepoint names resulting in partial rollbacks in nested transactions
2025-01-15 04:24:24
4385
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/757DescriptionWhen you wrap db.Transaction, go will only ...
Gorm gorm 使用shardingsphere做分表,新增数据时时报了如下错误
2025-01-15 04:24:21
654
首先:在navicat直接连接shardingsphere,执行新增语句是没有这个错误的,使用gorm执行这个语句就会有这个图一的错误Comment From: github-actions[bot]The issue has been a...
Gorm Possibility to set custom names to PK
2025-01-15 04:24:07
375
Describe the featureAllow custom names to be set for primary keys.MotivationIn other ORMs there is possibility to set cu...
Gorm Struct Tags/Fields Tags not work when call db.AutoMigrate()
2025-01-15 04:24:05
1776
ENV:go version go1.22.8 darwin/amd64"gorm.io/driver/sqlite v1.4.4""gorm.io/gorm v1.25.12"Define the model for sqlite tab...
Gorm When using embedded structure query, the result is not consistent with the expectation
2025-01-15 04:24:02
1866
Your QuestionI have two model structs. When I combine these two structs for querying, a problem occurs.The document you ...
Gorm 请问怎么在关联查询中添加查询条件?
2025-01-15 04:24:00
1117
例如: model := &models.User{} err = tx. Model(model ). Preload("Posts", func(db *gorm.DB...
Gorm autoUpdateTime and default seem to be conflicting
2025-01-15 04:23:57
2820
autoUpdateTime and default seem to be conflictingAs defined in the gorm documentation. I set the default value of these ...
Gorm https://gorm.io Unable to access
2025-01-15 04:23:55
120
DescriptionComment From: jinzhuseems it is caused by some issues of cloudflare, just fixed it.thank you for your report.
Gorm How to get sql statement
2025-01-15 04:23:50
3939
Your QuestionHow to get SQL statement before runI tried to use db.Statement.SQL.String() and db.Session(&gorm.Sessio...
Gorm OpenGauss DB support
2025-01-15 04:23:47
1272
Hi,at present, our projects using gorm need to use Huawei OpenGauss db, but there is no official driver supporting OpenG...
Gorm Transaction update RowsAffected is 0
2025-01-15 04:23:44
9877
Transaction update RowsAffected is 0Just like the following code, when it updates, RowsAffected is 0What version of Go a...
Gorm mysql biginto to golang int64 or []uint8
2025-01-15 04:23:32
4069
Your Question`type Status int// Scan 实现 Scanner 接口,用于将数据库的值映射到枚举类型func (s Status) Scan(value any) error {switch v := val...
Gorm MySQL create 默认值这样不符合文档描述吧? (column default value)
2025-01-15 04:23:30
439
Your QuestionType Model struct { UID int `gorm:"primaryKey"` Swtich1 int Swtich2 int}func CreateModel...
Gorm How add after commit callbacks
2025-01-15 04:23:23
986
Your QuestionHow can I have GORM2 add after commit callbacks? I understand how to do it after an insert, update, delete ...
Gorm AutoMigrate Does Not Update Existing Check Constraint
2025-01-15 04:23:21
5363
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/760DescriptionSummary:When modifying a check constraint o...
Gorm GORM save to map seems to require a model even though the table name is being specified
2025-01-15 04:23:18
1711
Your QuestionIn using the "Find to Map" feature it seems that even when specifying the table name a model is still requi...
上一页
下一页
1
…
903
904
905
906
907
…
2246
.