Nineya
Home
Blog
软著申请
Gorm 时间格式化对CreatedAt与UpdatedAt不生效
2025-01-14 08:13:11
226
Your Question请教一下为什么时间格式化对CreatedAt与UpdatedAt不生效,对别的字段生效,例如go版本:1.18.1依赖版本gorm.io/driver/postgres v1.3.7gorm.io/gorm v1....
Gorm Get inserted data in Create().After hook, especially PrimaryKayValue
2025-01-14 08:13:08
1414
Get inserted data in Create().After hook, especially PrimaryKayValueDescriptionIt would easliy implement in gormV1, d...
Gorm Is there a way to replace associations without the creation portion of upsert?
2025-01-14 08:13:06
1867
Is there a way to replace associations without making a call to insert the associated entities?The document you expected...
Gorm many2many has a question:Error 1075: Incorrect table definition; there can be only one auto column and it must be defined as a key
2025-01-14 08:13:03
1270
Description多对多关联,表迁移的时候,如果中间表对应的关联表不是主键id的话,创建会报错,报错内容为:Error 1075: Incorrect table definition; there can be only one au...
Gorm 基于grom官方应该开发一个缓存功能 可以基于redis来进行配置
2025-01-14 08:13:01
1920
Describe the feature在一些特殊的查询下 可以接受一段时间内,直接获取缓存数据(redis),这个时候可以来直接调用官方提供的方法来实现,虽然开发者也可以去实现,但是我感觉写在官方库内会更好,场景1比如需要统计一些没有实时...
Gorm Split pre-built query to separate conditions
2025-01-14 08:12:58
789
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/421/filesDescriptionHello there! We started migration fro...
Gorm v1.23.x third automigrate causes error in postgres
2025-01-14 08:12:55
845
With the latest gorm and postgres the third automigration is causing an error in Postgres.I've found this issue fixed:ht...
Gorm ERROR: operator does not exist: date >= integer (SQLSTATE 42883)
2025-01-14 08:12:53
1379
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/463DescriptionOn PostgreSQL 14.2, was comparing date in a...
Gorm Support GENERATED (aka "virtual") columns in GORM models
2025-01-14 08:12:50
1934
Describe the featureSupport for "generated" (aka virtual) columns as an independent struct tag option, something along t...
Gorm 关于结构体零值不更新问题
2025-01-14 08:12:48
802
现在对于结构体零值不更新的问题,官方好像给的说法只能用map,但是个人觉得map代码的可读性没有用结构体看起来工整,还需要自己定义对应的字段名字符串,这个有比较合适的解决方案吗。个人觉得这里不应该通过零值去判断是否,考不考虑引入指针,通过指...
Gorm Is it possible to specify charset and collation for table creation?
2025-01-14 08:12:45
2234
Hi,I'm wondering if it's possible to specify charset and collation for table creation?I searched existing issues and fou...
Gorm Scan进行扫描为null数据结果非预期
2025-01-14 08:12:43
713
Your Question使用Scan 进行扫描后:行数据内email 为null的情况下,将会被上一个email有值的数据覆盖The document you expected this should be explained数据表 数据...
Gorm Google Spanner Driver
2025-01-14 08:12:39
1320
We would really love to see a google spanner driver for gorm ❤️ Comment From: github-actions[bot]The issue has been auto...
Gorm gorm v1.23.6 use Find scanning data to struct slice problem
2025-01-14 08:12:36
1837
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/486Description使用 Find 扫描数据到结构体切片,如果结构体字段类型为 string,数据库字段值...
Gorm how to add extra field on many2many first create
2025-01-14 08:12:34
3380
Your issue may already be reported! Please search on the issue track before creating one.What version of Go are you usin...
Gorm How do I add a field to a many2many table and use it?
2025-01-14 08:12:31
1701
type Student struct {ID intName stringCourses []Course `gorm:"many2many:student_courses;"`}type Course struct ...
Gorm Read Only Fields
2025-01-14 08:12:28
1730
How to create read only FieldsThe document you expected this should be explainedExpected answertype Product struct { ...
Gorm When column is NULL it takes the value from previous record
2025-01-14 08:12:26
2493
GORM Playground Linkhttps://github.com/khanakia/gorm_playground_scan_nullDescriptionRun code: GORM_DIALECT=postgres go t...
Gorm 'AfterDelete' Hook does not triggered in Batch Delete
2025-01-14 08:12:22
1096
Your QuestionIt seems AfterDelete hook does not triggered when using Batch Delete.Example: tx.Model(&User{}).Where(c...
Gorm Howto Create virtual Fields ?
2025-01-14 08:12:19
1106
Howto Create virtual Fields ?How do I create a virtual field in the model, to bring a select like this:SELECT id,name,pr...
上一页
下一页
1
…
984
985
986
987
988
…
2246
.