英文: GORM Configure many to many with customs columns 问题 我有这两个模型: type Residue struct { ID int Name s...
Gorm:无法添加或更新子行 – 自引用的外键约束失败
英文: Gorm: Cannot add or update a child row - a foreign key constraint fails on self referencing 问题 我...
在GoRM中,查询行中的最大值返回”0″。
英文: query for maximum value in row returns "0" in GoRM 问题 使用GoRM与MySQL数据库,我在从一个相当简单的查询中返回数...
GORM [错误] 不支持的数据类型: &[], 错误的模式
英文: GORM [error] unsupported data type: &[], incorrect schema 问题 GORM v1.25.1,我正在尝试在Worker、Poste...
在自动迁移期间发现了结构体的无效字段。
英文: invalid field found for struct while automigrating 问题 当我尝试根据我的结构自动迁移表时,我遇到了这个错误,我不知道为什么会出现这个错误: ...
Golang Gorm在Where子句中转义字符不起作用。
英文: Golang Gorm Escaping characters in Where clause not working 问题 我有以下工作正常的查询: if err := rs.db. Pre...
更新列触发 Gorm 钩子时,传递的值不正确。
英文: UpdateColumns triggers Gorm hook with incorrect values 问题 我有这段代码,它更新表中的upvote和downvote列: // tx 是...
如何查询一个模型,其中关系的嵌入值等于特定值?
英文: How to query a model where the embedded value of a relationship equals a specific value? 问题 我有两个...
How to Eager Loading belongs to relationship using GORM
英文: How to Eager Loading belongs to relationship using GORM 问题 我有这两个结构体: // User 属于 Company,CompanyI...
在GORM中,是否可能自动迁移具有循环关系的表格?
英文: Is it possible to auto migrate tables with circular relationships in GORM? 问题 我一直在尝试在我们的Golang项目...
47