Gorm bug: first argument in the params is not binary

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/698DescriptionI'm having an issue in my code when switchi...

Gorm When the foreignkey field name is the same as the referenced, create a foreign key relationship error

this is the modeltype Collection struct { Name string `json:"name" binding:"min=1,max=20" g...

Gorm How to add a hint into Raw SQL?

Describe the feature1.How to add a hint into Raw SQL?I had a try to select/update,it's ok.but Raw("select from user lim...

Gorm gorm preload : error : teacher_scores: unsupported relations for schema TeacherInfo

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Descriptionwhen i use gin, gorm preload function is ok,...

Gorm Many to Many关联模式下关于BeforeCreate的疑惑

Your Question假设有a、b、c三个模型,它们之间的关联关系如下:type c struct { ID uint Bs []*b `gorm:"many2many:bs_cs"`}// c 有一个 ...

Gorm how to use the underlying connection pool in *gorm.DB for multiple concurrent sessions that are independent of each other?

Your QuestionPlease see the details at https://github.com/go-gorm/playground/pull/673#issue-2045891447This is to impleme...

Gorm How to Select ignored field gorm:"-" ?

Your QuestionIn Gorm v1, Selecting an ignored field used to work:type user struct { ID int64, Name string, ...

Gorm Can gorm return db default value after create

Your QuestionI have two fieldsCreated time.Time `gorm:"column:created;<-:false" json:"created&quot...

Gorm Proper MSSQL Support for multiple foreign keys in defining relationships

MSSQL support for multiple foreign keys (composite keys).GORM Syntax for multiple foreign keys generates a SQL Statement...

Gorm 查找不到数据的时候,err与gorm.ErrRecordNotFound比较的结果是false

当我查找不到数据的时候,这里的err变量打印出来的信息是"record not found",但是为什么err与gorm.ErrRecordNotFound比较的结果是false,求解答func (u User)Exist(username...

Gorm How to get transaction ID by gorm?

Hi,I have two questions:How to get transaction ID by gorm?Is it possible to output transaction commit and rollback infor...

Gorm GORM可以只创建表不创建索引么?

只需要根据model创建表,但不需要创建索引。Comment From: github-actions[bot]The issue has been automatically marked as stale as it missing p...

Gorm Model() ignores primary key in passed argument

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/723DescriptionAccording to https://gorm.io/docs/query.htm...

Gorm How return RowsAffectred for delete Association?

Your QuestionHow return rowsAffected for Association?I have 6 record in many2many table.I remove many2many connection vi...

Gorm generate struct from table fail: ERROR: relation "user" does not exist (SQLSTATE 42P01)

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionIt is reporting the error as the title descri...

Gorm How to use Automigrate to merge two tables into one

Your QuestionI have two tables in the database, and I want to run a migration to merge those two tables into one.For now...

Gorm 当唯一索引冲突时,使用OnConflict去批量插入时,针对冲突的结果没有返回主键id

表结构type BaseModel struct { ID int64 gorm:"primaryKey;autoIncrement" CreatedAt time.Time UpdatedAt time.T...

Gorm create on conflict returning id not right

CREATE TABLE tests( id bigint NOT NULL AUTO_INCREMENT, created_at timestamp NOT NULL DEFAULT CURRENT_TI...

Gorm 如何实现下面的AND与OR的优先级?

示例代码:// 构建要删除的条件conditions := []struct { GoodsID string PurchaseType int}{ {"33B3AFBAF000", 1}, {"33B3A...

Gorm 期望在struct tag中指定冲突更新字段

Describe the feature期望能在声明模型时指定当出现冲突时,更新字段Motivation这样可以简化使用,直接声明时就能决定怎么更新冲突字段Related Issues
上一页 下一页
.