Gorm Preloading with foreignKey and references overwrite does not work

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/671DescriptionWhen using a belongs-to relation with forei...

Gorm The number of idle connections exceeds the specified limit?

Your QuestionWhy did I configure the gorm with sqlDB.SetMaxIdleConns(25) and sqlDB.SetMaxOpenConns(50), but the number o...

Gorm Column struct tag for jsonb fields support

Describe the featureIs it possible for make such syntax work?type Example type { NameRu string `gorm:"column:name...

Gorm 名称不是id的主键,按主键查询生成sql错误

code:type User struct { Uid string gorm:"primaryKey" Name string CreatedAt time.Time ...

Gorm there are multiple data race in the code? 底层是gorm/logger和pg v5, 目前都升级到最新版了

==================WARNING: DATA RACEWrite at 0x00c00001200c by goroutine 36: runtime.slicecopy() /opt/homebrew/Cel...

Gorm Separate table & constraint creation during auto migration

Describe the featureThe migration should happen in two stepscreate all the tables without associations after table creat...

Gorm 如何增量的生成model和query?

Your Question每次数据库表有更新字段属性或者新增字段的时候,需要重新生成model和query。使用gorm gen这个包如何实现部分增量更新,而不是把表结构拿到后全量重新生成。因为有时候表结构不一定是受开发者控制(dba管理表...

Gorm Set postgres schema dynamically in a multitenant app

Your QuestionI am building a multitenant app with postgres. Tenants are split by posgtres schema. On every http request,...

Gorm 为什么设置的字段标签没有起作用

Your Question在 gorm 中,type User struct { UserId int64 gorm:"autoIncrement" Name string gorm:"primaryKey"...

Gorm Many2many and additional fields in association table

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

Gorm How to define decimal precision using gorm & postgres?

Your QuestionHow can I implement precision on decimals(float) using gorm?type Abc struct {FieldOne float64 gorm:"precisi...

Gorm OnDelete/OnUpdate constraints with many2many relationships?

Your QuestionIs it possible to specify ON DELETE and ON UPDATE for the foreign keys of a many2many relationship?I tried ...

Gorm Allowing Customization of Type and ID Column Names for Polymorphic associations

Describe the featureAllow users to customize the naming conventions for type and id columns when working with polymorphi...

Gorm where can I find gorm release note

I want to upgrade gorm, but the change log is out-dated. Comment From: github-actions[bot]The issue has been automatical...

Gorm Make LIKE query using struct fields

Your QuestionI want to run a LIKE query using gorm. Following the documentation, the only way is to use raw SQL query as...

Gorm many2many with Non-PrimaryKey(unique index) throw ERROR: primaryKey column of relation does not exist

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/630DescriptionI find that many2many does not support Non-...

Gorm Does golang Gorm 2.0 support a global BeforeSave hook function? I have attempted many scenarios, and one of my attempts is outlined below, but it failed. The SQL date still remains as '0000-00-00'.

Your QuestionDoes golang Gorm 2.0 support a global BeforeSave hook function? I have attempted many scenarios, and one of...

Gorm support executemany api like pymysql without specifying batchSize

Describe the featurebulk insert in tx regardless of max_allowed_packet and without specifying batchSizeMotivationpymysql...

Gorm 批量插入时候使用ON DUPLICATE KEY UPDATE 返回主键错误

func (c *OlapMetadataDetailDao) BatchSave(m []MetadataDetail) error { db := c.dbClient.GetClient().(*gorm.DB) resu...

Gorm When function

Describe the featureI want to add conditional query and It would be nice if we could have a .When() function which get a...
上一页 下一页
.