Gorm 使用gorm执行模型迁移返回 parse sql error

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 迁移的时候,怎么添加表注释

大家好,迁移数据的时候,如何添加表注释,在文档里面只找到了字段注释,没有找到表的注释,谢谢Comment From: github-actions[bot]The issue has been automatically marked as...

Gorm mysql Pluck 无法使用decimal

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/437Descriptionwallet := UserWallet{UserID: 1, Balance: de...

Gorm 表别名的支持有吗?

看了文档没有找到怎么使用表别名,貌似能做的只有 Table("t1 as a"), 然而这个用法一旦与 First / Last 一起用就会出错。不知道 gorm 是不是就完全没考虑过别名的支持,还是说有什么 API 我不知道的Comme...

Gorm GORM doesn't fill the foreign key id when doing an insert into

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?

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

proto-gen-go 生成的struct 默认会带上 state protoimpl.MessageState sizeCache protoimpl.SizeCache unknow...

Gorm find方法必须使用指针,即使对象已经是指针

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 ?

Your QuestionI defined a struct with autoUpdateTime field as here. It works when calling .Update() method.In my case, so...

Gorm uniqueIndex 标签出错无效

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionComment From: github-actions[bot]The issue ha...

Gorm 提一个通过where api查询全部数据的刚需

Describe the featureDB.DBLink.Where(query, args...).Find(dest),因为个人习惯问题,不习惯在find中写query, args,喜欢通过where来写条件,所以希望当在使用wher...

Gorm select方法大小写bug

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1result = DB.DBLink.Model(model).Select([]string{"ID...

Gorm Timezone issue using cockroachdb & postgres

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/416DescriptionDatabase: cockroachdbTimezone: Europe/Rome ...

Gorm V2 没有了 AddIndex 和 AddUniqueIndex 方法

Describe the feature实现手动灵活添加索引的 AddIndex 和 AddUniqueIndex 方法,像V1那样。Motivation旧项目使用gormV1,像下面这样添加索引:a.DB.Model(&model...

Gorm Cascade delete does not trigger associated items hook

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

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

Describe the featureWhen field comments change, I want to trigger automatic migrationMotivationMake automatic migration ...

Gorm Joins() doesn't respect soft deletes

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/412DescriptionIf you soft-delete a Has-One relationship, ...

Gorm find 多个条件and时候生成的sql语句出错

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?

Your QuestionI have a database which I do not control and cannot alter. Pardon the pseudo-code, only to illustrate the i...
上一页 下一页
.