刚接触go gorm,打算设置一对一的外键关系,发现怎么设置都不行,整了下午,记录一下表格字段idcategory_idtype ATable struct { Id int CategoryId int Category SportsCategory `gorm:"foreignKey:category_id;associati

- 阅读全文 -