Gorm create 插入的时间和真实写入mysql数据库不一致

Your QuestionCREATE TABLE `configs` ( `id` bigint NOT NULL AUTO_INCREMENT, `config_key` varchar(255) NOT NULL DEFAULT...

Gorm JSON serializer doesn't work in last version (json: unsupported value: encountered a cycle via *schema.Schema)

GORM Playground LinkSorry I didn't use the official playground since there is no model that use the json serializer. You...

Gorm logger.Default should use os.Stderr instead of os.Stdout

GORM Playground LinkDescriptionlogs should be written to stderr not stdout.But now:https://github.com/go-gorm/gorm/blob/...

Gorm how to use mysql user variable in Exec()?

Your QuestionMy code is like db.Exec("INSERT INTO table1 (name) values ('test');SET @id=@@IDENTITY;INSERT INTO table2 (t...

Gorm Rename index creates new but not delete old

Hi! I found some problem with indexes in PostgreSQL. For example, you have some tabletype USER struct { gorm.Model ...

Gorm 刚刚插入的数据,数据库能找到,gorm查询不到

//插入数据的代码: //手动分表创建 return db.Instance().Transaction(func(tx *gorm.DB) error { // 使用 'tx' 而不是 'db' info...

Gorm Why does not it support beforeFind hook ?

Your QuestionCan't find beforeFind hook which might be useful for table separation scene. The document you expected this...

Gorm BeforeQuery hook, alternatively a plugin to format before query

Your QuestionI am in need of some formatting before doing a query. Mainly converting shortuuid to uuid. What I have in m...

Gorm DB.Model().Find() The null value data is disordered

But the question said it had been solved https://github.com/go-gorm/gorm/issues/5415Here are my test resultsgorm.io/driv...

Gorm Expire Aurora Postgresql Connecitons when master-slave Switch

Describe the featureSystem Background:golang version 1.8postgresql version: Aurora Postgresqlgorm version: v1.21.15Issue...

Gorm cannot use map[string]gorm.Stmt{} (value of type map[string]gorm.Stmt) as type map[string]*gorm.Stmt in struct literal

Your Question同一项目不同框架开发下,其中一种报以下错误!# gorm.io/plugin/dbresolver ....\pkg\mod\gorm.io\plugin\dbresolver@v1.1.0\dbresolver...

Gorm How to use sql merge json syntax "||"?

How can I use SQL merge JSON syntaxWhen we do Upsert and get some conflicts, we can rewrite values for some fields, for ...

Gorm How do I prevent generating a resolver that returns an array of pointers?

Your QuestionModel:type Something { name: String! note: String site: String phase: String}type Query { somethings: ...

Gorm verifying module: gorm.io/gorm@v1.22.5: reading https://gosum.io/lookup/gorm.io/gorm@v1.22.5: 404 Not Found server response: Not Found

When I exec the command line go get -u gorm.io/gormthen can't download. Can you help me ?Comment From: github-actions[bo...

Gorm Feature Request: Model validation

Describe the featurerun the code belowpackage mainimport ( "gorm.io/driver/sqlite" "gorm.io/gorm&qu...

Gorm AutoMigrate failed on Postgres15 due to exist index name

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/561Descriptiondo AutoMigrate twice, it will failed on uni...

Gorm sql: converting argument $1 type: unsupported type gorm.DB, a struct

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Descriptionimport ( "gorm.io/driver/sqlite"...

Gorm is gorm.DB instance goroutine-safe?

i'd like to share gorm.DB instances among goroutines after being created with gorm.Openbut don't know whether its gorou...

Gorm need Rails ActiveRecord.with_lock feature

Your QuestionRails has with_lock feature , it meanBEGIN SELECT * FROM {table_name} WHERE {pkey} = {pkey_value} FOR UPDA...

Gorm Cannot close database connection

Your QuestionBy using Gorm v2 with Postgres, there is no db.Close() to close the database connection.But it was in Gorm ...
上一页 下一页
.