Nineya
Home
Blog
软著申请
Gorm one to one or one to many Relate
2025-01-14 08:29:32
1633
one to one or one to manyeg Official website Code:`// User 有一张 CreditCard,UserID 是外键type User struct { gorm.Model Cred...
Gorm I Can not work rollbackto.
2025-01-14 08:29:29
1935
Your QuestionHi everyone,I use testify and gorm in my project. I've created a testsuite which can be seen below. I've de...
Gorm How to get *sql.Tx from the existing gorm transaction?
2025-01-14 08:29:26
582
Your QuestionI know that gorm supports standard sql package conversion in db level using db.DB() but I couldn't find how...
Gorm Can't do simple update when there is a previous update clause
2025-01-14 08:29:24
1059
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/552DescriptionI'm having an issue with a custom data type...
Gorm i want ask can clear where condition. this like session NewDb
2025-01-14 08:29:22
2336
Your QuestionI have a piece of code, looking that this likefieldDb := db.Model(&MyModel{}).Select("first_field,...
Gorm Regression of Scan when loading pointer object in a struct
2025-01-14 08:29:19
2232
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/504DescriptionThere seems to have been a regression from ...
Gorm Gorm is iterating incorrectly when declaring a pointer to Embedded structs
2025-01-14 08:29:17
1477
type Enbedded1 struct { value string}type Struct1 struct { *Embedded1}When I query over Struct1 the same (last) value ...
Gorm 使用多对多自定义连接表,无法添加外键
2025-01-14 08:29:14
587
Comment From: github-actions[bot]The issue has been automatically marked as stale as it missing playground pull request ...
Gorm HasMany: ForeignKey as String
2025-01-14 08:29:11
1057
Your QuestionIs it possible to use a String as a specific ForeignKey ? Using PostgreSQL AdapterGolang 1.19.1 linuxgorm.i...
Gorm Memory leakage occurs during table creation and deletion.
2025-01-14 08:29:09
1174
version:gorm v1.22.3Test Scenario:create and drop table between sleep 1suse the code droptable:// DropTable drop table f...
Gorm Configure a timeout while making a connection to the Database
2025-01-14 08:29:05
933
Your QuestionHow do we configure a connection timeout while connecting to the database? Context:If the database is not r...
Gorm Prepared Statement with Multiple Parameters Gets Corrupted
2025-01-14 08:29:02
2108
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/550DescriptionThis page:https://gorm.io/docs/sql_builder....
Gorm DB.Count() return error value
2025-01-14 08:29:00
2127
I queried how many rows in tables use DB.Count(), it return 0, but there are 1 row matched in table. I trace this proble...
Gorm hasMany and hasOne cause "define a valid foreign key" error if field names are identical
2025-01-14 08:28:57
2264
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/1DescriptionThe previous changes of @yushulgin haven't fi...
Gorm db.Callback().Raw().Before doesn't work
2025-01-14 08:28:54
3104
Hello, when I use the Gorm to before, after method if err := idb.Callback().Create().Before("gorm:create").Regist...
Gorm Gorm docs search cannot search through code snippets
2025-01-14 08:28:52
792
Gorm docs search cannot search through code snippets.E.g search for db.exec no luck but it's present on this page https...
Gorm I can't use SET in db.Raw() or db.Exec()
2025-01-14 08:28:47
1674
Your QuestionI have a query like this.SELECT GROUP_CONCAT(distinct concat('max(CASE WHEN attribute_name = "' , attr...
Gorm updates() also updates non-nil field of a struct?
2025-01-14 08:28:41
978
Your QuestionIn document of "Updates multiple columns":When update with struct, GORM will only update non-zero fields, a...
Gorm How to use autoIncrement and autoIncrementIncrement?
2025-01-14 08:28:38
1088
Your QuestionautoIncrement 和 autoIncrementIncrement 好像没有效果.autoIncrement and autoIncrementIncrement seems has no effect....
Gorm 同样一份SQL,代码生成出来会报错,但是手动复制生成的SQL用Raw执行就正常
2025-01-14 08:28:36
1567
生成代码如下:错误信息: Error 1055: Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'gtest...
上一页
下一页
1
…
968
969
970
971
972
…
2246
.