Nineya
Home
Blog
软著申请
Gorm Incorrect ON CONFLICT when using composite primary key
2025-01-15 00:29:13
1199
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/652DescriptionExplain your user case and expected results...
Gorm FirstOrCreate Behaviour
2025-01-15 00:29:11
1207
Your QuestionHi,I am using the FirstOrCreate function.Suppose I have these trow structs and the corresponding tables:typ...
Gorm Scope not working in combination with callback
2025-01-15 00:29:09
1263
Your QuestionI added a custom callback and wanted to use a scope in. Bute the scope will not be called as expected. See ...
Gorm Need a function that gives us the TableName for any given struct
2025-01-15 00:29:06
1403
Describe the featureI want to get the name of the table for an arbitrary struct (that may or may not have a custom namin...
Gorm memory leak
2025-01-15 00:29:03
4472
step1:x1 = dbCC.WithContext(context.Background()).Model(&mode).Limit(nPageSize).Offset(Offset*nPageSize).Order("...
Gorm When using GORM to customize a parent model and implement logical deletion, the table is incorrect.
2025-01-15 00:28:58
2489
mybasemodel:type BaseModel struct { Id uint gorm:"primarykey" CreatedAt time.Time gorm:"column:add_ti...
Gorm DB tables and fields static typing
2025-01-15 00:28:55
1404
It is a bad practice to use pass DB field names as plain text to ORM methods.It is too easy to make a typo or forget a f...
Gorm Unexpected query result by using struct{} with &
2025-01-15 00:28:52
4534
// controllerif total, err := (models.UserAccountMessageRead{}).GetCountByIds(&models.UserAccountMessageRead{ Ope...
Gorm Automigrate cannot work properly when unique constraint changed.
2025-01-15 00:28:50
1337
GORM Playground LinkNo Link.DescriptionI basically use a migrate function to update my database(mysql) schema. But when ...
Gorm Can't insert array []string into PostgresDB with GORM
2025-01-15 00:28:45
771
Why is GORM not built-in to insert an array of strings into PostgresDB? Comment From: github-actions[bot]The issue has b...
Gorm Many2Many Multi-table query using Join Table error: Unknown column
2025-01-15 00:28:27
15478
I have two tables doing many2many, but when I try to join the query, he always reports that the column cannot be foundty...
Gorm Gorm MSSQL conditional unique index not working
2025-01-15 00:28:24
3319
DescriptionAs per the documentation on https://gorm.io/docs/indexes.html#Index-Tag gorm supports conditional indexing us...
Gorm Gorm 关于 updates的问题
2025-01-15 00:28:21
1579
代码如下。type xxxx struct { ID int gorm:"column:id" Email string gorm:"column:email" Mobile ...
Gorm CreateInBatches is not running inside Transactions
2025-01-15 00:28:19
1088
I would expect code like thisreturn d.table().Clauses(clause.OnConflict{DoNothing: true}).CreateInBatches(records, 2000)...
Gorm Preload with many entries results in empty return
2025-01-15 00:28:16
47117
Your QuestionMy question is: Why does Preload behave differently, with a larger number of entries?The line in question l...
Gorm Custom error message on validation
2025-01-15 00:28:12
2036
Custom error message on validationHi i would like to know if there is a workaround for custom error message so front end...
Gorm goland 控制台输出的sql日志问题
2025-01-15 00:28:09
1474
goland 控制台输出的sql日志无法直接点击进行跳转原打印样式(蓝色链接点击可跳转到sql源代码处):现打印样式(绿色链接不可点击):Comment From: github-actions[bot]The issue has been...
Gorm Returned error is not gorm.ErrDuplicatedKey when duplicate entry is being created
2025-01-15 00:27:31
1906
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/649DescriptionWhile creating a duplicate entry the error ...
Gorm Postgres: AutoMigrate re-migrates everytime for some types
2025-01-15 00:27:28
803
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/646DescriptionEvery time we run AutoMigrage we get re-mig...
Gorm distinct did not take effect when shared with count
2025-01-15 00:27:26
3004
Your Questiondistinct did not take effect when shared with count, mysqldb.db.Model(&User{}).Distinct("name"...
上一页
下一页
1
…
941
942
943
944
945
…
2246
.