type Class struct {
Stus []*Score
gorm:"foreignKey:StuID"
}
type Stu struct {
StuID int64
Scores []*Score gorm:"foreignKey:ScoreID"
}
type Score struct { ScoreID int64 Math int } 我尝试了文档里的例子,只能删除Class 下的Stus ,但是Stus切片中Stu的Scores 没被删除,gorm有递归删除方法吗,还是说需要分两步,先删除Class 的Stus ,然后自己再遍历Stus切片,删除每个Stu的Scores
Comment From: github-actions[bot]
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking ✨