Nineya
Home
Blog
软著申请
Gorm 一对多添加关联时,many表有unique。引发重复时不报错
2025-01-14 08:02:55
1619
go version go1.17.6 windows/amd64gorm.io/driver/mysql v1.3.2 gorm.io/gorm v1.23.2 表结构:type Users struct { Id ...
Gorm Select类型语句添加Hint无效
2025-01-14 08:02:53
2958
1、想对一个select语句的开头增加一个hint注释,下面这种写法发现hint没有加上package mainimport ( "fmt" "gorm.io/driver/mysql" ...
Gorm 版本号作为查询条件
2025-01-14 08:02:50
1405
表中有一列放的是版本号,格式是三段式,例如:1.2.21现在想要根据这一列来进行查询,例如:查询版本号大于1.0.5的所有记录,数据库是MySQL8.0+,请问使用gorm应该如何实现,谢谢Comment From: github-acti...
Gorm Is it possible to DryRun without calling BindVarTo?
2025-01-14 08:02:48
1396
Your QuestionIs there a way to run a query in dry run mode, and NOT bind the vars?I have a section of code where I use D...
Gorm Circular reference in model causes app freeze
2025-01-14 08:02:45
634
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/420DescriptionHey there! I've just started using Gorm and...
Gorm panic when preload substruct of nested struct
2025-01-14 08:02:42
3413
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/406DescriptionThere are unexpected scenario when I try to...
Gorm How to use preload in Raw SQL ?
2025-01-14 08:02:40
452
Your QuestionIs there any document or example?Comment From: magicLianinnerQuery := db.Raw("? UNION ?", db.T...
Gorm 最新版 1.23.1版 preload 不工作。
2025-01-14 08:02:37
767
Description这两天刚好用到gorm. 可以db.model(&xxx). preload ("***"), 都不到结果,debug 发现preload根本没有进行。换上旧的版本(前年的,不知道什么版本号)工作正常。希望开发...
Gorm fatal error: concurrent map writes
2025-01-14 08:02:35
6856
Your QuestionEventually I am having the following error, but I have not been able to reproduce it in a case, what am I d...
Gorm Available struct tags for a Model
2025-01-14 08:02:32
423
Your QuestionWhat are the available struct tags for the model? I can't find it anywhere in the documentation.The documen...
Gorm (MySql)OnConflict for hasOne/hasMany assotiations - specify all (non keys) fields updates for all tables
2025-01-14 08:02:29
3685
Your Questionlet's suppose the user table has addresses discounts, whatever - any kinds of hasOne and hasMany relations...
Gorm Queries with Preload return random results from database even if the query is empty
2025-01-14 08:02:27
7782
Your QuestionHello ! I have been experimenting with your library for quite a while now, but it seems that I do not actua...
Gorm 是否可以在 errors.go 里增加一个变量表示 Duplicate Entry 错误?
2025-01-14 08:02:25
1660
在插入新数据时如果字段是 UNIQUE INDEX 并且已有同样的值,则会报 Duplicate Entry (mysql)错误。是否可以在 errors.go 文件里加一个变量用于表示这个错误?文档里有 Upsert, OnConflic...
Gorm Support a with clause (CTE)
2025-01-14 08:02:22
8118
Describe the featureImplement with.go to support a With clause (CTE).I have a fork repository that implements this API a...
Gorm could not import C (cgo preprocessing failed) (compile)
2025-01-14 08:02:19
102
Your QuestionHi what´s wrong with it?The document you expected this should be explainedExpected answer
Gorm Whether the gorm plugin for Go2sky-plugins supports Postgres?
2025-01-14 08:02:16
161
Your QuestionWhether the gorm plugin for Go2sky-plugins supports Postgres?https://github.com/SkyAPM/go2sky-plugins/blob/...
Gorm Conditionally add index using gorm tags
2025-01-14 08:02:14
1124
Hi, i want to add unique index on two fields but only if one of them is available.for example:for a model with email and...
Gorm Preload and join with nested
2025-01-14 08:02:12
1248
Your QuestionI have this association[A] 1-1 [B] 1-* [C]I want all A with its B and every C for each B and tried with the...
Gorm gorm 支持乐观锁 Version 吗?
2025-01-14 08:02:09
935
Comment From: longbozhan应该不支持,看看能否把这个特性加上去 @jinzhuComment From: chenyu1990Updates(map[string]interface{}{ "total...
Gorm Support associations for Scan
2025-01-14 08:02:06
2337
Hey,is it possible to scan associations, because I tried but it didn't work so far:var events []Eventself.DAO.DB.Raw(&qu...
上一页
下一页
1
…
994
995
996
997
998
…
2246
.