Gorm Not being able to properly update a belongs-to association

Your QuestionI have the following structurestype Contact struct { gorm.Model Phone string `json:&quot...

Gorm migrator HasColumn will panic when the first parameter is a string

GORM Playground LinkDatabase mysql, driver: gorm mysqlif migrator.HasColumn("TableName", "fieldName"...

Gorm Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"' at line 1

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionI am trying to connect to a an 8.03 MySQL dat...

Gorm Valuer interface not support point

GORM v1.24.0DescribeIt is support!type Strings []stringfunc (s Strings) Value() (driver.Value, error) { if len(s) == ...

Gorm Could GORM support the freedom to choose whether to query zero fields when querying by struct?

Describe the featureWhen querying with struct, the released GORM will only query with non-zero fields, that means if the...

Gorm When .Select(xxx) does not contain a primary key,The FindInBatchs function endless loop.

Your QuestionWhen .Select(xxx) does not contain a primary key,The FindInBatchs function endless loop.The document you ex...

Gorm 增加ID字段后,autoMegrate失败

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Descriptiontype Book struct { //gorm.Model ID u...

Gorm when i update varchar column to '' ,i get null value in column "telephone" of relation "grain_oil_product" violates not-null constraint

2022/10/20 14:49:57 d:/code/golang/jgx_hfp/api/app/repository/grainOilProductRepository.go:29 ERROR: null value in colum...

Gorm [新手提问]如果使用Migrator创建带有租户ID的表名的表

我定义的模型代码是这样的:type User struct { gorm.Model TenantID stringjson:"tenantID" gorm:"-"UserName stringjson:"userName" g...

Gorm May I ask how the TOSQL method can wrap the variable of string type with 'xxx' single quotes instead of "xxx" double quotes

May I ask how the TOSQL method can wrap the variable of string type with 'xxx' single quotes instead of "xxx" double quo...

Gorm Make Order Func Support Custom String Type

Describe the featurecan we just make order func support custom string type?type TableAOrderBy stringvar orderBy TableAOr...

Gorm get HaveCountList function return no all fields

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/543DescriptionHaveCountList func: func (srv *commentServi...

Gorm Could GORM to support the freedom to choose whether to query zero fields when querying by struct?

When querying with struct, the released GORM will only query with non-zero fields, that means if the field’s value is 0,...

Gorm 我们发现使用gorm1.24.1出现错误

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Description

Gorm uniqueIndex space issue

The Struct:type CardConfigFeatures struct { // Base Entity b.Base // Card Config ID CardConfigId uuid.UUID `gorm...

Gorm How do we store and read ip addresses inet datatypes with GORM and PostgreSQL?

How do we insert and select from a table with inet datatype using GORM?here is my modelimport ( "github.com/jack...

Gorm 数据库字段值无法正确获取

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Description当数据数据库字段定义成 单词+“_”+数字时,gorm无法获取该字段的值Comment F...

Gorm 外键的类型是longtext,mysql报错

ParentId string gorm:"type:varchar(255),size:255"我指定类型是varchar,但是迁移的时候,还是longtext。即使我手动建表,它还是想改成longtext。ALTER TABLE...

Gorm gorm Find,Mysql中值为NULL的时间类型,结构不为time零值而是复用上一行结果

问题描述:定义结构体时,成员的类型为time.Time。声明一个该结构体的切片,并用Find去查询。数据库中的NULL时间,查询出来不是time.Time的零值,而是上一个下标的time.Time值gorm版本:gorm.io/gorm v...

Gorm Life cycle already unavailable.

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionLife cycle already unavailable.type Topic str...
上一页 下一页
.