Gorm With gorm and the sqlite driver that comes with gorm, when storing a number of the string type, if the number is very long, then the number is stored in the database as a scientific notation

Your QuestionWith gorm (" Gorm.io /gorm") and the sqlite driver that comes with gorm (" Gorm.io /driver/sqlite"), when s...

Gorm Initialization with no default dialector

Your QuestionIf we wish to use a DBResolver for multiple Sources and multiple Replicas, do we need to provide a default ...

Gorm Lazy Connections with Read/Write splitting

Your QuestionI'd like to use read/write connection splitting with the DBResolver. When using this plugin as-documented, ...

Gorm 分组多字段查询数据有重复

offset, limit := utils.DbPage(ctx.Request)var ticketGroup = make([]vo.TicketGroup, 0) count, err := tx.Select(dao.Ticke...

Gorm How to create a query CASE WHEN

I want to create a query like this CASE WHEN but i do not see any option or anything like that in docsSELECT id, CAS...

Gorm Way to escape Question Mark in Raw Query?

For the jsonb field type in PostgreSQL 9.4, the question mark '?' is used as an operator: http://www.postgresql.org/docs...

Gorm FOREIGN KEY constraint failed (1811) on AutoMigrate when set foreign_keys ON for SQLite

GORM Playground LinkN/ADescriptionMy model:type User struct { //Main columns UserId uint `gorm:"prim...

Gorm Connect Postgresql failed in AWS Lambda

Hi there, I have a Golang program that use gorm to connect to Postgresql and run in AWS lambda, sometimes there are con...

Gorm sqlite: primary key contstraint gets lost when embedded struct also contains primary key

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/712DescriptionFor the following modeltype Common struct {...

Gorm VAPID 字段被自动识别为 v_api_d

Description定义如下模型:type VAPID struct { ID int VAPID string}然后调用 AutoMigrate(&VAPID{}) 自动迁移,结果数据库中出现的字段名为为 v_api...

Gorm When to run SetupJoinTable

Your QuestionWhen using customized join tables with the SetupJoinTable function, when should that function be run? Shoul...

Gorm many2many assoc. table has other fields

Your QuestionHi! I am trying to insert in many2many associations, but it fails due to NOT NULL error, e.g.:type Car stru...

Gorm How to update by force a zero value?

Your QuestionI redefine a type and implement interface driver.Value and driver.Scanner,for instance, I want type []strin...

Gorm Memory leak?

I want to query database data to the map [string] interface {}. The total amount of data is approximately 170w, with a t...

Gorm Get some specific fields of preload, not all

Your QuestionI have a 2 tables: user and order, order belong an user.User { ID uint Name string ...}Order { ID uint ...

Gorm save_associations set to false but association is still being inserted and it has PK

GORM Playground LinkNote: I will update this with the playground link as soon as it's ready. I am having an issue with t...

Gorm Cannot update Model inside BeforeDelete

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/318DescriptionI want to make some modifications to the Mo...

Gorm Provide more convenient way to update bool fields

Describe the featureIt would be very useful to be able to update bool values (even when they are the zero value false) u...

Gorm How to make Gorm AutoUpdateTime work with BulkUpsert

Your QuestionI am using gorm's AutoUpdateTime in my struct against a time field. I am using BulkUpsert operation to upda...

Gorm Upgrading to 1.25.11 results in "unterminated quoted identifier at or near ""))"" on migration

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/753DescriptionUpgrading to 1.25.11 caused an error on mig...
上一页 下一页
.