Nineya
Home
Blog
软著申请
Gorm 使用gorm执行模型迁移返回 parse sql error
2025-01-14 08:02:04
3610
Git commit:2016-11-29 20:49:41 +0800 @104a5d4Build time:2017-12-26 10:56:03 +0000 by go version go1.7.6 linux/amd642022/...
Gorm 迁移的时候,怎么添加表注释
2025-01-14 08:02:01
2090
大家好,迁移数据的时候,如何添加表注释,在文档里面只找到了字段注释,没有找到表的注释,谢谢Comment From: github-actions[bot]The issue has been automatically marked as...
Gorm mysql Pluck 无法使用decimal
2025-01-14 08:01:58
4075
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/437Descriptionwallet := UserWallet{UserID: 1, Balance: de...
Gorm 表别名的支持有吗?
2025-01-14 08:01:53
2608
看了文档没有找到怎么使用表别名,貌似能做的只有 Table("t1 as a"), 然而这个用法一旦与 First / Last 一起用就会出错。不知道 gorm 是不是就完全没考虑过别名的支持,还是说有什么 API 我不知道的Comme...
Gorm GORM doesn't fill the foreign key id when doing an insert into
2025-01-14 08:01:50
13664
Your QuestionI'm having some issues with GORM.I have the following structs:type Player struct { ID ...
Gorm Is .Save() broken with gorm v1.23.1 and postgres v1.3.1?
2025-01-14 08:01:47
1870
Your QuestionAfter updating from * gorm.io/driver/postgres v1.2.3* gorm.io/gorm v1.22.5togorm.io/driver/postgres v1.3.1g...
Gorm 用proto-gen-go生成的Model Struct 进行Preload find 会出现 panic: reflect.Set: value of type is not assignable to type string
2025-01-14 08:01:44
738
proto-gen-go 生成的struct 默认会带上 state protoimpl.MessageState sizeCache protoimpl.SizeCache unknow...
Gorm find方法必须使用指针,即使对象已经是指针
2025-01-14 08:01:42
897
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1var destFan orm.Fanxx.find( &destFan )这样可以var destFa...
Gorm How to make .Exec(Raw SQL) also update autoUpdateTime field ?
2025-01-14 08:01:39
558
Your QuestionI defined a struct with autoUpdateTime field as here. It works when calling .Update() method.In my case, so...
Gorm uniqueIndex 标签出错无效
2025-01-14 08:01:37
2293
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionComment From: github-actions[bot]The issue ha...
Gorm 提一个通过where api查询全部数据的刚需
2025-01-14 08:01:33
781
Describe the featureDB.DBLink.Where(query, args...).Find(dest),因为个人习惯问题,不习惯在find中写query, args,喜欢通过where来写条件,所以希望当在使用wher...
Gorm select方法大小写bug
2025-01-14 08:01:30
1835
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1result = DB.DBLink.Model(model).Select([]string{"ID...
Gorm Timezone issue using cockroachdb & postgres
2025-01-14 08:01:27
2391
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/416DescriptionDatabase: cockroachdbTimezone: Europe/Rome ...
Gorm V2 没有了 AddIndex 和 AddUniqueIndex 方法
2025-01-14 08:01:23
1911
Describe the feature实现手动灵活添加索引的 AddIndex 和 AddUniqueIndex 方法,像V1那样。Motivation旧项目使用gormV1,像下面这样添加索引:a.DB.Model(&model...
Gorm Cascade delete does not trigger associated items hook
2025-01-14 08:01:20
3504
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/425Model structure with hooktype BaseModel struct { ID...
Gorm DB.Set() doesn't work with custom join tables
2025-01-14 08:01:18
525
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/413DescriptionThe docs (https://gorm.io/docs/settings.htm...
Gorm Whether automatic migration can update field comments
2025-01-14 08:01:14
482
Describe the featureWhen field comments change, I want to trigger automatic migrationMotivationMake automatic migration ...
Gorm Joins() doesn't respect soft deletes
2025-01-14 08:01:11
732
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/412DescriptionIf you soft-delete a Has-One relationship, ...
Gorm find 多个条件and时候生成的sql语句出错
2025-01-14 08:01:08
2769
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Description用DB.DBLink.Where(“id=? and nickname=?”, 7,'ni...
Gorm many2many table name, how to avoid alteration?
2025-01-14 08:01:06
1428
Your QuestionI have a database which I do not control and cannot alter. Pardon the pseudo-code, only to illustrate the i...
上一页
下一页
1
…
995
996
997
998
999
…
2246
.