Kevin Yuan

Results 2 issues of Kevin Yuan

下面是根据 https://gorm.io/docs/associations.html#Delete-Associations 写的程序,想要在删除`User`时同时删除其`Company`关联,但是不成功。不确定是 docs 有误还是`Delete`的实现有误。 ``` package main import ( "fmt" "gorm.io/driver/sqlite" "gorm.io/gorm" "gorm.io/gorm/clause" ) type User struct { ID int64 `gorm:"primarykey"` Name string CompanyID int64 Company Company } type...

type:missing reproduction steps
status:stale

1. Add go.mod. 2. Change platform dependent path `"/usr/bin/git"` to `"git"` in New().