Many-to-many relationship in oop

后端 未结 7 758
北恋
北恋 2021-02-04 15:53

what is best way to model many-to-many relationship?

lets say we have a two classes , Team and Player

  • any given P
7条回答
  •  臣服心动
    2021-02-04 16:22

    it is fine, Player has a collection of Team and Team has collection of Player. You need to be careful about integrity in add/remove operations, because they are not "atomic"

提交回复
热议问题