Gorm Count Not executed as expected

Your QuestionExampler := roomModel.Room{ Id: 9999999999,}var count int64e := r.DB().Model(r).Where("1=1").C...

Gorm How to handle related models inside a plugin?

Your QuestionHow to handle related models inside a plugin?The document you expected this should be explainedhttps://gorm...

Gorm Upsert associations with conditions (only upsert if parent entity condition is met)

Your QuestionHow can we upsert association with conditions?If the main record condition does not meet, associations shou...

Gorm Duplicate primary key error returned when saving unmodified object

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/582DescriptionComment From: dablelvI also encountered the...

Gorm How Can I add a unique constraint that ignores existing violations?

Your QuestionHow Can I add a unique constraint that ignores existing violations?type Page struct { ShortID string `...

Gorm Plugin or callback that happens on any error

Describe the featureI'd like a Plugin or Callback that is called on any error generated when accessing the database.Moti...

Gorm Autoincrement is not enabled in SQLite when used with AutoMigrate

DescriptionVery simple use case:package mainimport ( "log" "gorm.io/driver/sqlite" "go...

Gorm 如何使外键值为 NULL?

Your Question我希望我的外键值为 NUll,但是 GORM 却将它设置为 0// District 行政区域// 数据来源 https://github.com/uiwjs/province-city-chinatype Dis...

Gorm Backreferences ignore custom join tables

Backreferences ignore custom join tableshttps://github.com/zhaogongchengsi/gorm-bug-recurrencetype User struct { Id ...

Gorm AutoIncrement does not work

GORM Playground Linkgorm 版本: gorm.io/gorm v1.23.8 gorm.io/driver/sqlite v1.3.6Descriptiontype Project struct { ...

Gorm How can I break the line when the gorm tag is too long

Your QuestionMy index tag is to long, I try add \ and \n ,but can't usetype BasicChargeSetting struct { ID uui...

Gorm Updating documentation for #6097 center around "Create and drop view"

Describe the featureVIEW handling for database has been added to GROM recently, but the instruction pages on the website...

Gorm can't preload field

I've just started getting this error for multiple entities, but I'm having a nightmare pinning down how to fix it.Last n...

Gorm Google Spanner Postgres FORCE_INDEX

Your QuestionI am trying to force an index following https://cloud.google.com/spanner/docs/secondary-indexes#index-direc...

Gorm Some questions about using postgresql with gorm

Your QuestionIn the official documentation, there is not a specific enumeration point for the supported type types.eg: j...

Gorm How can I add index in many2many

Your QuestionI use want add two fields priority index, first is id and organization_id in patient, second is id and orga...

Gorm PreparedStmtDB does not implement Ping()

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/585DescriptionPreparedStmtDB does not implement Ping() to...

Gorm 🐛 Preload data to struct using gorm pk and fk but have call all table need to preload

Descriptionthis is my work preload struct in grom version 1.21.15type MapProduct struct { Model ProductID u...

Gorm Postgresql: read connection reset by peer

What version of Go are you using (go version)?1.10.3Which database and its version are you using?postgresql 9.6.3// db ...

Gorm Multiple same-type belongs-to fields not working (?)

Multiple same-type belongs-to fields not working (?)I'm implementing a database architecture which has 1 one-to-many rel...
上一页 下一页
.