Nineya
Home
Blog
软著申请
Gorm Is it possible to dynamically group conditions?
2025-01-14 08:19:15
2946
Your QuestionIs it possible to dynamically group conditions?The Grouped Conditions in the documentation are hard coded, ...
Gorm 创建记录时零值布尔字段无法通过select()指定
2025-01-14 08:19:12
676
db.Select("*").Create()布尔零值即使使用了Select指定,MySQL最终的记录值还是Model中gorm tag default:null指定的null。Comment From: github-actions[bo...
Gorm 不使用gorm.Model 里面的ID命名,一对多,一对一的struct 维护起来及其困难,没有头绪
2025-01-14 08:19:09
1392
类似这里的问题:https://stackoverflow.com/questions/69990097/gorm-2-golang-auto-migrate-table-with-foreign-key使用默认的ID,把很多细节都隐藏起来...
Gorm Enum tag does not work with postgresql when Automigrate.
2025-01-14 08:19:06
640
This tag does not work with postgresql when Automigrate.sql:"type:enum('owner', 'write', 'read');"but mysql worked.postg...
Gorm Where(whereStr, args...)中的in条件和Group同时使用时出现语法错误
2025-01-14 08:19:03
685
version: 1.23.8error: sql: converting argument $5 type: unsupported type []int64, a slice of int64Comment From: github-a...
Gorm clause.Set MergeClause is not merged correctly
2025-01-14 08:19:01
1253
When adding a clause.Set to the db.Statement don't merge the original clause expression, but overwrites it.Currently cod...
Gorm Models with composite keys cannot be successfully removed using Delete(...)
2025-01-14 08:18:58
3297
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/405DescriptionI think, Gorm should generate valid sql and...
Gorm How to create foreign key constrains after creating tables?
2025-01-14 08:18:56
988
Your QuestionThe solution I found for https://github.com/go-gorm/gorm/issues/5695 seems to be:type A struct { ID ...
Gorm How to combine HasMany and BelongsTo to the same table?
2025-01-14 08:18:54
712
Your QuestionI create BelongsTo relationship:type A struct { ID uint MyFavoriteBID uint ...
Gorm sqlserver query with where condition has error
2025-01-14 08:18:49
928
db driver use gorm.io/driver/sqlserversqlserver version: 2019 devorm := db.Table("t_test").Where("id = ?&...
Gorm gorm.Expr() does not support subQuery
2025-01-14 08:18:47
317
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/230DescriptionWhen I use subQuery in Expr(), it throws me...
Gorm Migrator fails with SQLSTATE 42704
2025-01-14 08:18:44
4761
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/433DescriptionModel:type Group struct { ID string `...
Gorm What is the best way for type ColumnType to return extra info, ex displayType.
2025-01-14 08:18:41
844
Your QuestionHi, I am new to golang, I have one question about ColumnType.In my example, I have one column named "positi...
Gorm How to execute COUNT (*) OVER() AS some_column_name using GORM
2025-01-14 08:18:39
1729
Your QuestionHow to execute COUNT (*) OVER() AS some_column_name using GORMThe document you expected this should be expl...
Gorm Is there any Preload equivalent, but to use combined to gorm.Create?
2025-01-14 08:18:36
1849
Your QuestionIs there any Preload equivalent, but to use combined to gorm.Create? For example, image these structures:ty...
Gorm 请问设置了关联后,数据库可以不添加外键的吗
2025-01-14 08:18:34
553
代码package modelimport "gorm.io/gorm"type Note struct { gorm.Model UserId int GroupId int Questi...
Gorm 请问下现在有一个特别复杂的结构体,是以interface类型接收的,我本意是用gorm:"type:json"表示下,让它以json的方式存入数据库,但是发现好像不行,请问我应该怎么做?
2025-01-14 08:18:31
143
Your QuestionThe document you expected this should be explainedExpected answerComment From: a631807682https://github.com...
Gorm Driver for pure Go sqlite implimentation
2025-01-14 08:18:28
2488
Describe the featureDriver for https://pkg.go.dev/modernc.org/sqliteMotivationSo that we can use a sqlite DB without nee...
Gorm How to make "created_at,updated_at" field work as expected(Timestamp Tracking) when set default value "1970-01-01 00:00:00"?
2025-01-14 08:18:26
1235
Your QuestionIn Product environment, filed set default null is not allowed. Thus we usually set create/update time field...
Gorm Problem with MSSQL: "Invalid usage of the option NEXT in the FETCH statement. "
2025-01-14 08:18:23
2728
Hello, I'm trying to create a "Create or Update" approach on MSSQL using Gorm. Since GORM has firstOrCreate() and Assign...
上一页
下一页
1
…
978
979
980
981
982
…
2246
.