英文: How can I input data into a mysql model from an array in GO? 问题 所以,我正在使用GO和GORM开发这个MySQL模型,用户可以输...
如何编写一个迁移来在 GOLANG 的表字段中添加非空约束。
英文: How to write a migration to add not null in table field GOLANG 问题 我想修改User模型中的一个列。 type User str...
在Golang的GORM中,如何引用同一张表的两个列,并且在插入时出现问题?
英文: golang gorm reference two columns to same table, problem with insert 问题 原始想法是从Yii中构建一个RBAC类似的模型。...
GORM GIN 更新查询导致 500 内部服务器错误。
英文: GORM GIN Update Query Results in 500 Internal Server Error 问题 我正在使用Gin和GORM在Golang中构建一个Book API。...
How do I do table locking in GORM(Golang)?
英文: How do I do table locking in GORM(Golang)? 问题 在GORM(go-gorm)中如何进行表锁定? 我找到了一种进行行锁定的方法,但是找不到进行表锁定的...
Gorm UUID外键 – 属于
英文: Gorm UUID foreign key - belongs to 问题 我正在尝试在两个数据库表之间创建一个属于关系,使用GORM,我的代码如下: type Shop struct { I...
如何创建/设计一个超级菜单?
英文: How to Go/Gorm a megamenu? 问题 我正在使用Go编写一个电子商务应用程序,并且在使用PostgreSQL表实现megamenu时遇到了困难。最终的JSON响应应该类似...
尝试使用Fiber和GORM编写一个创建数据库的POST请求,但是出现了错误。
英文: Trying to write a post request to create a database with fiber and gorm and it gives me an error...
如何将NULL值插入UUID而不是零值
英文: How to insert NULL value to UUID instead of zeros 问题 我有一个在Postgres中的表格,其中有一个UUID字段类型,它必须是唯一的,但可以...
Golang Gorm无法从关联表中检索数据。
英文: Golang Gorm not retrieving data from associated table 问题 我正在使用Gorm和MySQL开发一个Gin应用程序。为了在Gorm模型中定义...
47