Gorm Convert field failed: parsing time "0001-01-01 00:00:00 BC": extra text: " BC"

I got the error when parsing the datetime value from the Postgresql database. The value is 0001-01-01 00:00:00, so gorm ...

Gorm updates 子结构体空值更新

要通过struct更新,可以通过SELECT指定空值字段但是如何指定子结构体的空字段呢type A struct{ Id int64 `gorm:"column:id"` Name string `gorm:...

Gorm Association Problem

Your Question[0.563ms] [rows:0] SELECT languages.code,languages.name FROM languages JOIN user_speaks ON user_speaks.lang...

Gorm How to get inserted id when using Create From Map

Your QuestionI read the doc here https://gorm.io/docs/create.html#Create-From-Map and find that gorm can use Create From...

Gorm dont use this ,really.

too many bugs.Comment From: github-actions[bot]The issue has been automatically marked as stale as it missing playground...

Gorm 修改了主键之后 has one,updates 或save 会重复添加关联数据

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1重复新增数据问题我用官网的hasone的例子,然后id用了string做主键,当我create的时候,数据和关联...

Gorm dbresolver v1.2.3编译错误

GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1Descriptiongo.mod引用: gorm.io/gen v0.3.16 gorm.io/g...

Gorm Add/Delete a primaryKey not working for add new column or alter existing column

gorm.io/gorm v1.22.5db: mysql1、Delete primary key do NOT worktype TestB struct { AColumn string `gorm:"column:a;...

Gorm [Preloading] Many Input Values to Preloaded Relationships Fail to Load

DescriptionI'd include a Go Playground if this was easy to setup, its not.This is a bit of a strange one. I've been usin...

Gorm 使用update时, joins不生效问题

使用方式:测试将update改成find可以正常查询到数据, 是不支持joins...update...这种方式吗DEBUG输出UPDATE `recruitment_campaign_application`SET `recruitmen...

Gorm AutoMigrate runs ALTER COLUMN TYPE smallint when such type is already existed

Hello everyone, I have found a bug and written some unittest #5463 which presents what is wrong with AutoMigrate and Mig...

Gorm can not dump sql when use CreateInBatches

sql = tx.ToSQL(func(tx *gorm.DB) *gorm.DB { return tx.Model(&entity.InboundApplicationSkuExtend{}).CreateInBa...

Gorm Is it possible to add a database management platform?

When I used first in the query, because I used the platform name in db.table, the order by also existed, so my query rep...

Gorm Enhancement: Asynchronous operations

Hi,My application's needs would be better served with options for asynchronous queries. For example, I want to confirm t...

Gorm Mysql generates table index tag implementation

// GetIndexes return Indexes []gorm.Index and execErr errorfunc (m Migrator) GetIndexes(dst interface{}) ([]gorm.Index, ...

Gorm 多对多关系表在Save时在关联表中新增数据

多对多关系时,使用save()方法去更新数据时,会在关联表中新增一条数据,期望是更新表结构:type DnsPreplanAtom struct { Model Name string ...

Gorm GORM models: Foreign key to link to different Postgres schema

DescriptionUsing 2 separate apps, within a monorepo, I connect through GORM to the same Postgres DB with different DB us...

Gorm sql查询假如在SELECT 里面带有子查询的问题

下面是代码 db := public.OpenMysql() var datat = make(map[string]interface{}) err := db.Raw("SELECT n.appstore,n....

Gorm Callback 无法真正的删除

(grom.callback).Remove 的实现是往 (grom.processor).callbacks 追加新的 callback,而不是删除。如果执行了 Register("c1")-> Remove("c1"),(*gro...

Gorm Primary key query error after Gorm upgrade

Old gorm version: github.com/jinzhu/gorm v1.9.12 New gorm version: gorm.io/gorm v1.23.6go-sql-driver : github.com...
上一页 下一页
.