Gorm 自动迁移表报错

当数据库里表不存在时,自动迁移可以正常运行。当数据库里表已经存在,新增字段或更改之前字段类型,会报错,错误如下:2022/04/24 15:40:51 D:/Developement/go/pkg/mod/gorm.io/driver/po...

Gorm 用原生sql查出来的结果和gorm DB.Raw(sql).Scan(&result) 出来的结果不一致

select * from ( select * from 'authorization' order by created_at desc )authorizati...

Gorm Support go 1.18 generic for dao operations.

For example, query result can be of type *T[], instead of interface{}.Comment From: github-actions[bot]The issue has bee...

Gorm Foreign Key AutoMigrate default value

Your QuestionIs there a way to prevent foreign keys from copying over the default value of its reference?In the docs, it...

Gorm SASL authentication for Postgres

Your QuestionHi everyone! Tried to do my best looking for the solution everywhere, including stackoverflow, gh issues et...

Gorm Offline document download

Your QuestionI am viewing online documentation at https://gorm.io/zh_CN/, but the internet access is really slow, where ...

Gorm Named variables don't work when followed by Windows CRLF line endings

GORM Playground LinkI've created a PR with test cases instead.To ReproduceRun the following query (includes the line-end...

Gorm 可以新增分页功能吗?

可以新增分页功能吗?在实际的项目中分页功能十分常见。type PageModel struct { List *interface{} `json:"list"` Total *int64 `j...

Gorm id

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

Gorm Database aliases are added to the INSERT statement.

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/478DescriptionMy code is below.// mysql// CREATE TABLE ta...

Gorm support for MongoDB connection

Hi, i'm interested with GORM library and i intend to implement it in my project, but, for my Database, i use MongoDB fro...

Gorm Does gorm support MongoDB?

Your issue may already be reported! Please search on the issue track before creating one.What version of Go are you usin...

Gorm Is it possible for gorm to support MongoDB(NoSQL)

Your QuestionIs it possible for gorm to support MongoDB(NoSQL)The document you expected this should be explainedExpected...

Gorm 连表统计总数,生成sql报错.

GORM Playground LinkDescription之前在select里加上w.id 就能生成count(*),但是更新框架后就报错了如果不加w.id 还是会报错解决方法是select放在count之后, 这也太反人类了.Comm...

Gorm gorm.io\driver\sqlserver@v1.2.1\create.go:55:33: not enough arguments in call to field.ValueOf

gorm.io/driver/sqlserverD:\my-dev\pkg\mod\gorm.io\driver\sqlserver@v1.2.1\create.go:55:33: not enough arguments in call ...

Gorm Gorm怎么区分获取到的字段是NULL还是空string""

Your QuestionHow to distinguish between field is NULL or empty string in the Gorm ?The document you expected this should...

Gorm Fixtures support

JSON/Yaml based fixtures support would be a great feature to be able to seed the database with the data specified in thi...

Gorm Why set "db.Statement.Joins = nil" when query ?

in file: callbacks/query.go192 db.Statement.Joins = nilI have 2 models:type User struct { models.Base Nick...

Gorm 依赖的go-mssqldb存在问题

问题:github.com/denisenkom/go-mssqldb../../../vendor/github.com/denisenkom/go-mssqldb/token.go:790:79: cannot use info.Mes...

Gorm Add embeddedIndexPrefix in addition to embeddedPrefix

Describe the featureCurrently, GORM supports embedding structs, which prepends a prefix to all COLUMN names.I'd like to ...
上一页 下一页
.