Nineya
Home
Blog
软著申请
Gorm 朱建ID 查询用什么 ?First()??有bug 后面会跟上 ORDER BY bv.id LIMIT 1
2025-01-14 08:06:55
1452
d := new(BVData)err := gormDB.First(d, id).Error生成的 sql WHERE bv.id = '10180827' ORDER BY bv.id LIMIT 1有没有考虑单独搞个 朱建的查询写法...
Gorm 插入数据的时候如何将字段值为空,例如string 类型字段的值为"",int 类型字段的值为0这样的数据插入。目前看起来使用struct插入会自动过滤
2025-01-14 08:06:53
1446
Your QuestionThe document you expected this should be explainedExpected answerComment From: xiashaohua发现是这段代码导致的for _, f...
Gorm use limit with preload
2025-01-14 08:06:50
3876
Hello I have Room and Messages tables where where room has many messages. I want to get user rooms with limit 20 rooms a...
Gorm Association on SQLite gives unsupported data type: <nil>
2025-01-14 08:06:47
1975
Your QuestionHi, I am getting an unsupported data type: <nil> while trying to retrieve associated data. I can see ...
Gorm field tag scale not work
2025-01-14 08:06:42
4143
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/268DescriptionI added a float64 field named Points to the...
Gorm [skiphooks] can not work for preload Associations anymore in v1.23.5
2025-01-14 08:06:38
955
GORM Playground Link(https://github.com/cxiang03/playground/commit/c02ce1c4d7ec866aac67b2cc6d7338e632a0bfa9)Descriptions...
Gorm Simple insert into many2many
2025-01-14 08:06:36
4337
Using gorm v2.The modelstype Organization struct { ID uint `gorm:"column:id;primaryKey"` Nam...
Gorm db.First 生成错误的SQL
2025-01-14 08:06:33
2762
type User struct { ID string}如下代码生成的SQL:user := &User{}db.First(user, "123456")SELECT * FROM `user` WHE...
Gorm Column does not implement gorm.ColumnType (missing AutoIncrement method)
2025-01-14 08:06:28
1347
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Descriptiongo.mod are discribed as below gorm.io/driver/...
Gorm [bug]reflect: reflect.Value.Set using unaddressable value....goexit: BYTE $0x90 // NOP
2025-01-14 08:06:26
11636
[GIN-debug] Listening and serving HTTP on :80812022/04/30 17:08:53 {"ID":0,"CreatedAt":"0001-01...
Gorm Gorm not retrieving data from associated table
2025-01-14 08:06:23
4854
I'm working on a Gin app using Gorm with MySQL. In order to define a belongs to relationship in a Gorm Model, you have t...
Gorm bug: AutoMigrate with special table name
2025-01-14 08:06:21
864
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/471DescriptionI don't know if this is a bug or an unsuppo...
Gorm gorm returns gorm.ErrRecordNotFound even though the ID is the DB
2025-01-14 08:06:19
4434
Hello, we are seeing something very concerning with this code:u := User{ID: "EXISTING_STRING_ID_IN_THE_DB"}err...
Gorm Commit / Rollback Should Return Error
2025-01-14 08:06:16
3223
Describe the featureCommit and rollback should return an error and not the DB instance.MotivationIn Go, it's common to u...
Gorm ERROR: rows to struct with an interface{} field
2025-01-14 08:06:13
578
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/468DescriptionHave a struct that has couple of fields of ...
Gorm Question: How do I use Changed in BeforeUpdate to track changes on a field in an embedded struct?
2025-01-14 08:06:11
351
QuestionHow do I use Changed in BeforeUpdate to track changes on a field in an embedded struct? I tried Changed("field1-...
Gorm Question: custom log context
2025-01-14 08:06:08
3315
My english is so poor, article translated with Google Translate.Form is nested in Gin. Because there is some chain infor...
Gorm Add Close function for gorm.DB
2025-01-14 08:06:06
1877
Describe the featuregorm.DB创建出来之后也是需要关闭的。如果不关闭,程序退出时mysql会打印类似下面的日志2022-04-10T03:27:09.414539Z 25 [Note] Aborted connect...
Gorm gorm
2025-01-14 08:06:03
1372
Questions about the Paginate function of GORM's Scopescode:func main () { if err:= initDB(); err !=nil{ fmt.P...
Gorm FindInBatches in an unexpected manner with limit or offset in original query
2025-01-14 08:06:01
1439
GORM Playground LinkIt's a reversed test, which means the CI SHOULD FAIL instead of success.https://github.com/go-gorm/p...
上一页
下一页
1
…
990
991
992
993
994
…
2246
.