Your Question

我有一个团队表,一个成员表, 一个团队成员关系表. 关系表中有个字段status用来确定成员是否还在.(我不知道这个字段是否可以用?) 现在我要查询某现有团队现有人员, 怎么查询? 我要查询团队拥有过的所有成员怎么查询? 当然纯 sql语句我会搞, 用gorm v2怎么做? 请大家指教....(这个中间表有必要存在吗?)

The document you expected this should be explained

Expected answer

Comment From: github-actions[bot]

This issue has been automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days

Comment From: socylx

解决了吗,似乎没有解决方案?

Comment From: a631807682

https://gorm.io/docs/many_to_many.html#Customize-JoinTable https://github.com/go-gorm/gorm/blob/master/tests/joins_test.go#L270

Comment From: Ystars

请问解决的了吗?