Gorm Returning Data From Deleted Rows failed

Your QuestionWhy did my code for testing Returning failed?s := "%s:%s@tcp(%s)/%s?charset=%s&parseTime=%t&lo...

Gorm Custom Data Type Scanner Method Never Get Called

DescriptionI have a custom data type and its Scanner method that will check for any data input// TimeString typetype Tim...

Gorm gorm通过Raw查询,然后Scan到[]map[string]interface{} 字段名转驼峰,通过NamingStrategy可以实现吗

package mainimport ( "log""github.com/iancoleman/strcase""gorm.io/driver/mysql""gorm.io/gorm""gorm.io/gorm/schema")ty...

Gorm 自动会多出一个条件( order. = 0.000000 ), 使用 First 自动会多出一个order by 排序, 使用原生Db.Raw 也会多出这些, 这个是大BUG ?

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Description 自动会多出一个条件( `order`. = 0.000000 ), 使用 F...

Gorm 使用 Serializer 标签实现json序列化读写入库会报错

# 我的问题是:type Content struct { Id uint64 `gorm:"primaryKey;column:id;type:bigint unsigned;not null&...

Gorm How to execute MSSQL stored procedure and take the result in GORM

How to execute MSSQL stored procedure and take the result in GORMList of Objects or MapComment From: a631807682gorm does...

Gorm Is there any way to set the time field to null?

Your QuestionThe time field cannot be set to null if it already has a valuea go struct:type Test struct { gorm.Model ...

Gorm function Updates do not seem to behave well

(ENGLISH version)Why gorm.DB.Updates always changes the created_at field when performing updating?Here is a minimalist e...

Gorm 在更新数据时join表不生效?

环境go 1.19.5gorm v1.23.10mysql 5.6代码由于实际业务代码过于复杂,此处抽象举例我有两张表,结构:type User struct { Id int Name string GroupId in...

Gorm mysql scan rows to map[string]interface,type DECIMAL is string #4466

GORM Other Playground Linkhttps://github.com/go-gorm/playground/pull/337mysql: scan rows to map[string]interface,type DE...

Gorm preload don't work

how to print the preload sql , I mean "Preload("Top2Comments")"'s executing processes Comment From: github-actions[bot]T...

Gorm 导入报错

go: gorm.io/gorm@v1.24.5: verifying module: gorm.io/gorm@v1.24.5: checking tree#15345421 against tree#15425001: reading ...

Gorm The result of the update did not meet expectations.

I have defined two structs.type User struct { Uid string `json:"uid" gorm:"primaryKey; type:char(...

Gorm composite key auto-increment returned 0 upon Create of new record

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/417DescriptionUse Case:Define table with multiple primary...

Gorm default:null columns do not update with FullSaveAssociations

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/554Descriptiontype User struct { gorm.Model Name ...

Gorm why Omit is not used in select.

I want to exclude some columns when selecting.Comment From: tempurai+1 here, really neededComment From: Tang8330@jinzhu ...

Gorm Automigrate with uniqueIndex error on 1.24.5

DB: PostgresqlDescriptionLooks like gorm 1.24.5 has an issue if you create a model with uniqueIndex attribute. Looks lik...

Gorm char()标签不生效

Your Question使用定长字符串作为主键ID string `gorm:"primarykey;char(44)"`上面这样写报Error 1170错误:Error 1170: BLOB/TEXT colu...

Gorm gorm.io/driver/sqlserver error on start project

Descriptionversion GO 1.19.5ERROR:gorm.io/driver/sqlservergo\pkg\mod\gorm.io\driver\sqlserver@v1.3.2\sqlserver.go:90:22:...

Gorm gorm 分组查询文档描述用法的问题

Your Question//这是官网对分组查询的描述https://gorm.io/docs/advanced_query.html#Group-Conditionsdb.Where( db.Where("pizza = ?&...
上一页 下一页
.