Nineya
Home
Blog
软著申请
Gorm Json.RawMessage and Mysql
2025-01-14 11:45:43
5312
QuestionHello, I just want to save data from golang using gorm to my mysql database, In this case, this is my struct: ty...
Gorm AutoMigrate will create many indexes of the same field
2025-01-14 11:45:39
1099
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionAutoMigrate会创建很多个同字段的索引,如下图所示AutoMigrate will...
Gorm Delete Polymorphic with Select cannot access in BeforeDelete Hook
2025-01-14 11:45:34
2552
I have 2 models as below:type Banner struct { Base Description string `json:"description"` Link...
Gorm how to delete object with self-referenced objects
2025-01-14 08:45:24
3403
Discussed in https://github.com/go-gorm/gorm/discussions/6344Originally posted by **pplmx** May 22, 2023if there is a st...
Gorm Questions about the common use of GenerateModel and GenerateAllTable
2025-01-14 08:45:18
1188
I have multiple tables and I want to customize the fields for certain tables during generation. There may be duplicate o...
Gorm BeforeSave is executed twice in transaction
2025-01-14 08:45:16
4502
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/593DescriptionWhen you save a model which BeforeSave is i...
Gorm AutoMigrate not creating constraints properly
2025-01-14 08:45:13
1751
I'm running AutoMigrate on this model but it is not working properly:type BrandMemoryContent struct { gorm.Model C...
Gorm Order() function call makes query execution about 1000 times slower.
2025-01-14 08:45:10
1439
Your QuestionHaving .Order() function call slows down query execution by 1000x timeWe have the code that is something li...
Gorm TestDialectorWithErrorTranslatorSupport fatal message error
2025-01-14 08:45:08
1231
DescriptionHi, Maybe the fatal message is error?https://github.com/go-gorm/gorm/blob/001738be49d26d341f88377d6006356573c...
Gorm GORM不执行查询
2025-01-14 08:45:05
5825
db.Ping和db.Stats()以及数据库连接的单例模式结果如下func GetInstance() *gorm.DB { host := viper.GetString("mysql.default.hostname&...
Gorm Belongs to foreign key field name cannot be equal to primary key of assigned struct
2025-01-14 08:45:02
3046
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/467DescriptionUsinggithub.com/golang-sql/civil v0.0.0-202...
Gorm mysql query error
2025-01-14 08:45:00
5773
{"time":"2023-05-19T10:02:32.4227988+08:00","level":"-","prefix":"echo","file":"recover.go","line":"113","message":"[PAN...
Gorm feat: add doc for association unscoped
2025-01-14 08:44:57
194
Describe the featureadd doc for association unscopedMotivationWelcome to submit PR in go-gorm/gorm.io to help us improve...
Gorm Rename License to LICENSE
2025-01-14 08:44:55
450
Describe the featureRename the license file from License to LICENSEMotivationLICENSE is the standard. A lot of tooling i...
Gorm Bitmap indexes for Postgres
2025-01-14 08:44:52
688
Your QuestionI saw in the docs that we can set the type of indexes. As we want to use an index on a low cardinality fiel...
Gorm Sqlite: delete missing where clause when unique key present
2025-01-14 08:44:50
1677
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/599DescriptionI have a simply master/detail structure:typ...
Gorm Create has many relationship with multiple tables
2025-01-14 08:44:47
1286
type User struct { gorm.Model Name string CreditCards []CreditCard `gorm:"foreignKey:ReferrerID&quo...
Gorm How to get the query statement
2025-01-14 08:44:45
925
Your Questiondb.Statement.SQL.String() and db.Statement.Vars is always empty, is there any way I could get the raw state...
Gorm How to make composite join work?
2025-01-14 08:44:42
1301
Your QuestionIn composited model, like below:type Thing1 struct { Id1 uint `gorm:"primarykey"` Name s...
Gorm Auto associations causes strange sql errors
2025-01-14 08:44:39
4781
Your QuestionThis query generates error sql and cannot work anyway. I use AutoMigrate to create the tables.type UserGrou...
上一页
下一页
1
…
952
953
954
955
956
…
2246
.