Nineya
Home
Blog
软著申请
Gorm First等查询方法,如何避免日志中出现大量record not found?
2025-01-15 04:01:21
2054
自从用了新版本发现日志里出现大量record not found,作为error打印出来了,但我认为这并不是error,而且statement里提供了一个 RaiseErrorOnNotFound 选项,但是这个选项在First()等查询方...
Gorm MySQL / Error 1869: Auto-increment value in UPDATE conflicts with internally generated values
2025-01-15 04:01:19
1746
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/212DescriptionHello,When creating a record with Create(),...
Gorm GORM type 为int,在tag中指定了type为int类型,自动迁移后还是会创建为bigint的类型的字段。
2025-01-15 04:01:16
1262
GORM Playground LinkDescriptiontype User struct { Id int `gorm:"type:int"`}Comment From: github-actions[bot...
Gorm Why does db.RowsAffected return 0 after the data is updated?
2025-01-15 04:01:14
821
After successfully updating data using Updates, RowsAffected returns 0db := mysql.DB.Model(&User{}).Where("dele...
Gorm Unexpected SQL Query Generation with Consecutive First Calls
2025-01-15 04:01:11
3997
DescriptionI am encountering an issue where consecutive calls to the First method generate a SQL query with duplicated c...
Gorm How to map a []int type to a string type in SQL?
2025-01-15 04:01:08
2615
Your QuestionI wrote the following code referring to this document:func connection() *gorm.DB { dsn := "root:roo...
Gorm 批量创建时,当传递的dst的元素是Interface时报错
2025-01-15 04:01:06
2111
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1问题描述定义如下接口type CommonSyncInstance interface {}定义如下model,...
Gorm Gorm v1.25.5 create two records,but get the duplicate PRIMARY KEY
2025-01-15 04:01:03
1090
DescriptionWe have a table like this:Table `MyTest` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '自增 ID', `g...
Gorm Panic In AfterInitialize
2025-01-15 04:01:00
2748
https://github.com/go-gorm/gorm/blob/52404cddbb5f5b18253cebe12fde20b577b1c86d/gorm.go#L136When an error occurs in Apply ...
Gorm 外键bug
2025-01-15 04:00:58
1962
我有2张表,type QuantUser struct { gorm.Model UUID uuid.UUID `json:"uuid" gorm:"type:char(36);comment...
Gorm Many2Many Relation Produces Unwanted where Condition
2025-01-15 04:00:53
11996
Your QuestionWhy many2many relations produces an unwanted where condition?Reproduction StepsI have a gorm model which us...
Gorm Why not use the base entity to get the table name
2025-01-15 04:00:51
1181
Discussed in https://github.com/go-gorm/gorm/discussions/6866Originally posted by **cxy1620541673** March 5, 2024locati...
Gorm Partial failures in testing MySQL 5.7, all successful test cases in testing MySQL 8.0
2025-01-15 04:00:48
824
The built-in test in the master branch passed all the test cases I ran using MySQL 8.0, while MySQL 5.7 partially failed...
Gorm GORM Save model with Associations but incorrect work
2025-01-15 04:00:42
2593
go gormhere is modelWhen I run the program twiceresult here in my database table:name in workers have a unique indexAs y...
Gorm Can Gorm elegantly update null value columns?
2025-01-15 04:00:29
844
For example, using Must to specify the columns that must be updated:db.Where("id=?", id).Must("keywords&...
Gorm Default value for text type is not showing in generated structs
2025-01-15 04:00:26
1283
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionI have created a user table for example:CREAT...
Gorm how do hook before select query on target tables
2025-01-15 04:00:24
2573
Your Questiontable user ( id, name )table staff ( id, user_id, name)table foo ( id, user_id, staff_id )table operations ...
Gorm unsupported data error with nested joins/preloads
2025-01-15 04:00:21
669
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/715DescriptionIn our project we have deeply nested data t...
Gorm Noticed a bug with embedded structs not being nil
2025-01-15 04:00:19
1043
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/714DescriptionWhen adding a new type Address string and u...
Gorm Conditions for Joins
2025-01-15 04:00:16
1658
Hi! How can I write conditions for Joins? I need something like thisJoins("UserProgram", "currency_id = ? AND activated ...
上一页
下一页
1
…
925
926
927
928
929
…
2246
.