Nineya
Home
Blog
软著申请
Gorm TTL or soft delete in the future
2025-01-14 08:05:00
1644
Describe the featureI think it would be more logical to use NOW() check for deleted_at field instead of NULL only checkS...
Gorm 为啥无法创建多个字表
2025-01-14 08:04:57
1063
func (Animal) TableName() string { return "test_" + strconv.Itoa(index)}func main() {//连接数据库gorm.io/gormdb, err := go...
Gorm Preload seperate fields to the same model
2025-01-14 08:04:55
1519
Your QuestionIf this has already been answered i appologise, i couldn't find one in my search.I am looking for a way to ...
Gorm Using AutoMigrate in a transaction, an error occurs
2025-01-14 08:04:53
4830
Environmentplatform: macos go version: 1.16.6 gorm verison: v1.23.3DescriptionWhen I execute it the second time, t...
Gorm tables lost when joins exists in from clause
2025-01-14 08:04:50
1054
in file: callbacks/query.go97 joins := []clause.Join{}98 if fromClause, ok := db.Statement.Clauses["FROM&...
Gorm failed to parse default value CURRENT_TIMESTAMP for field
2025-01-14 08:04:47
4172
`type AgentInfo struct {Id int `gorm:"primary_key;AUTO_INCREMENT;column:id;type:int;" json:"id"`AgentStatusTime Time `go...
Gorm gorm最新版Has Many只写入了关联数组的第一个
2025-01-14 08:04:45
2705
测试程序如下:package mainimport ( "fmt" "gorm.io/driver/sqlite" "gorm.io/gorm" "...
Gorm NamingStrategy.formatName does not replace special chars when formattedName is >=64-byte long
2025-01-14 08:04:42
1139
GORM Playground Link=> OK, will do later this week, too late for todayDescriptionWhen an FK-generated-name is too lon...
Gorm With Postgres, fails to create records with belongs_to association
2025-01-14 08:04:39
754
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/458DescriptionA query fails to create (in this example ar...
Gorm table primary key ID after create is 0
2025-01-14 08:04:37
839
GORM Playground Linkhttps://github.com/zcgzxg/gorm-issueDescriptionin above example,i got this:&{0 2022-02-23 17:02:...
Gorm table 字段标记了tag为主键, 无法插入试卷
2025-01-14 08:04:34
1307
表结构如下,DeviceID 是主键整数字段,但是不是自增类型type SensorCurrent struct { DeviceID uint json:"device_id" gorm:"p...
Gorm How to declare a model start with '_' in Gorm?
2025-01-14 08:04:32
924
I'm trying to declare a model and insert some data in a table with a column named '_update_time'.type User struct{...Upd...
Gorm joins+scanf方法无法无法bind查询到的数据
2025-01-14 08:04:29
1588
gorm.io/driver/mysql v1.3.2gorm.io/gorm v1.23.2使用joins + scanf时 debug打印的sql可以查询到数据但我的指针对象为null`NewsJoinType struct { ...
Gorm gorm.io文档与实际效果有差异
2025-01-14 08:04:26
502
Your Questiondb.Delete(&User{}, 10)官方文档:DELETE from user where id = 10;实际效果:DELETE from user where 10;First方法也有类似问题。...
Gorm Association ModifyStatement context nil
2025-01-14 08:04:24
125
GORM Playground Linkhttps://github.com/go-gorm/playground/pull/457DescriptionAssociation modifyStatement should keep co...
Gorm setting default value for a field is not working
2025-01-14 08:04:22
2043
Your QuestionMy question is that why when I create a new object why default values aren't used in object creation?// Tod...
Gorm SQLite command PRAGMA table_ Is info ([table name]) not supported by Gorm?
2025-01-14 08:04:19
1759
SQLite command PRAGMA table_ Is info ([table name]) not supported by Gorm?The document you expected this should be expl...
Gorm Change Column name CreatedAt, UpdatedAt and DeletedAt
2025-01-14 08:04:17
3851
Hello, I'm trying to change the name of the default columns createdAt, updatedAt and deletedAt to another language, in t...
Gorm 如何使用Map条件进行模糊查询
2025-01-14 08:04:12
769
使用Map条件进行查询时,进行的是精确匹配。例如代码db.Where(map[string]interface{}{"name": "jinzhu", "age": 20}).Find(&users)得到的SQL是SELECT * ...
Gorm Do we need call tx.Rollback() after tx.Commit() got error?
2025-01-14 08:04:10
955
Your QuestionDo we need call tx.Rollback() after tx.Commit() got error? According to examples in https://gorm.io/docs/tr...
上一页
下一页
1
…
992
993
994
995
996
…
2246
.