Gorm Trying to set pgsql current_app_user using parameterized statement but fails

Your QuestionIm trying to set current_app_user using a parametrized statement, but apparently this is failing and I cant...

Gorm v1.24.6 Duplicate saving of sub-table data. v1.24.6 重复保存子表数据

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/575DescriptionThe sub-table structure is associated with ...

Gorm Upsert does not update primary key

GORM Playground LinkI will try to prepare a Playground PoC for this issue.DescriptionWe are using Gorm with Postgres gor...

Gorm Callbacks on embedded object not called if embedding object has its own callbacks

We have a following struct:Embedding:type Embedding struct { Embedded Name string `gorm:"index"` ...

Gorm A bug about updates and select

I have a struct type User struct { Name string Sex bool Age int}if i want to query name and age,db.Select("nam...

Gorm Postgres: column "xxxx" cannot be cast automatically to type bigint (SQLSTATE 42804)

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/475DescriptionIf we want to change column from varchar to...

Gorm Find() query conds is none which query all records

var languages1 []Language emptyQueryConds := []string{} err := DB.Find(&languages1, emptyQueryConds).Error...

Gorm Scan panics when passed a pointer to pointer to array

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/506DescriptionIn v1.21.15 I was able to Scan into a point...

Gorm The AUTOUPDATETIME does not go through the driver.Valuer during an UPDATE SET or ON CONFLICT statement

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/490DescriptionThe goal is to change the time.Time to anot...

Gorm Issue migrating field with CURRENT_TIMESTAMP

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/526DescriptionDefining a model with default:CURRENT_TIMES...

Gorm Update jsonb's nested field via jsonb_set?

Your QuestionUsing postgresql, with a column of type jsonb.What's the best way to update jsonb's nested field via jsonb_...

Gorm DropColumn with string table panics with a nil dereference

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/532DescriptionWhen using Migrator.DropColumn, the table c...

Gorm Field should be unique but is not, causing unnecessary ALTER TABLE executions

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/525DescriptionDefining a model field with the uniqueIndex...

Gorm sqlite: AutoMigrate does not set default value for new boolean columns

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/555DescriptionWhen a new boolean colum is added, AutoMigr...

Gorm RowsAffected 取值逻辑不对

Descriptionpackage mainimport ( "database/sql" "fmt" "time" "github.com/g...

Gorm Can't recognized $[?] Placeholder ?

package version gorm.io/gorm v1.23.8 for idx, d := range o.StorageSpecs { db.Where(`storage_device->"$...

Gorm How to select additional custom fields when using Smart Select Fields?

Your QuestionI'd like to select something when using Smart Select Fields for example, Location table istype Location str...

Gorm A limit of zero returns the wrong results

DescriptionSpecifying a limit of 0 results in all rows being returned instead of none due to https://github.com/go-gorm/...

Gorm ScanRows using a structure is not the same as Scan using all field of the structure

GORM Playground LinkI found out I got different results using ScanRows or Scan.if I use:err=models.DB.ScanRows(nodes, &a...

Gorm uuid columns default to text

The long and short of it is that gorm only seems to respect uuid columns if they're primary keys, in all other cases, it...
上一页 下一页
.