Nineya
Home
Blog
软著申请
Gorm Gorm hooks BeforeUpdate and BeforeSave always works after every hook
2025-01-14 08:01:03
285
Your Questionis there any solution to disable BeforeUpdate and AfterUpdate hooks, because this hooks always works after ...
Gorm Is there a way to make gorm send database specific values for created_at, updated_at and deleted_at fields?
2025-01-14 08:01:01
1556
Your QuestionI have one instance of Postgres DB, and several instances of my app running simultaneously. It is possible ...
Gorm Don't upsert when Create Association
2025-01-14 08:00:58
1211
Your QuestionHi thanks for the great library!I've looked for a while for the same question but haven't found anything. I...
Gorm 连表查询如何统计总数?
2025-01-14 08:00:55
322
Your Question`db.Model(model.Banners{}).Count(&total) //这么写的话会报 s.* 字段不存在s.data.DB.Model(&model.Banners{...
Gorm sqlite3 string primary key suddenly has data type int
2025-01-14 08:00:51
1403
Your QuestionI'm using gorm with sqlite3 which worked fine. Now I suddenly got the error data type mismatch, then I look...
Gorm How can I remove all data generated with a test once the test finishes?
2025-01-14 08:00:48
2520
Your QuestionI'm trying to write a test suite with gin and gorm. The problem I am facing is that tests leave behind data...
Gorm 仅创建已经存在的外键关联关系
2025-01-14 08:00:46
1023
Describe the feature当我保存一个存在外键关系的表,如果我设置了外键关系,目前默认会创建不存在的外键项,然后再进行关联,现在我想问下是否可以只关联已经存在的项,而不去创建新的关联项。例子如下:type User struc...
Gorm composite primary key does not work as expected
2025-01-14 08:00:43
851
h2. modeltype PriceDaily struct { Product string `gorm:"primaryKey"` Date string `gorm:"primaryK...
Gorm update only changed field when Save()?
2025-01-14 08:00:40
1195
Your QuestionI have a big table which have many columns, each time I update some fileds and call Save(), all fields are ...
Gorm The logic of automatic migration is not rigorous
2025-01-14 08:00:38
5202
GORM Playground Linksorry, the project is urgent so I don't have time, I'll try to make it clearAnd I found the code for...
Gorm ORDER and vars
2025-01-14 08:00:30
1094
Your QuestionI would like to perform a request in the form of:SELECT … ORDER BY ts_rank(ts, to_tsquery('english', 'torna...
Gorm gorm cant detect proper foreign key in case of field embedding
2025-01-14 08:00:28
1440
https://github.com/go-gorm/playground/pull/414Hi, gorm cant detect proper foreign key in case of field embedding.How to ...
Gorm Help with this query with subquery
2025-01-14 08:00:25
446
I`m trying to mount this query but not getting it. Can someone help? WITH teste as ( SELECT cb.title, cb.amount, count(c...
Gorm gorm.io/gorm v1.23.0使用plugin/soft_delete报错
2025-01-14 08:00:23
1359
go.mod: gorm.io/driver/mysql v1.3.0 gorm.io/gorm v1.23.0 gorm.io/plugin/soft_delete v1.0.5go build:gorm.io/plug...
Gorm unanticipated error with context canceled
2025-01-14 08:00:17
590
in gorm v1.22.4 , stress test my services.it still reutrn unanticipated error when context canceled, suchsql: transactio...
Gorm support scanner/valuer in tags
2025-01-14 08:00:13
1228
Describe the feature能否在 tags 里指定 scanner/valuer 或者 dataType。这样对于复杂的类型,就不需要每个都实现这些接口了。比如type User struct {Interests []str...
Gorm Gorm slow when querying 4000+ rows
2025-01-14 08:00:11
3700
Your Questionversion: v1.22.4I have a query which is not slow when I use explain analyze in pgsql:pgsql=> explain ana...
Gorm Getting Data race gorm.RegisterDialect/gorm.newDialect()
2025-01-14 08:00:08
2366
Hello,Encountered an issue while running test code, getting data race as following[2022-02-11T13:11:38.067Z] WARNING: DA...
Gorm how to get insert id when we use Raw for complex insert sql
2025-01-14 08:00:05
1522
Your Questionhow to get insert id when we use Raw for complex insert sql?err := dl.db.Transaction(func(tx *gorm.DB) erro...
Gorm Is there an an Include function (opposite of Omit) ?
2025-01-14 08:00:03
1090
Your QuestionIs there an opposite to Omit? Pretty much every server will have a User model with a password field. Usual...
上一页
下一页
1
…
996
997
998
999
1000
…
2246
.