I have a fundamental design question in modelling the relationships between the entities for my application. Apple doc states Inverse relationships are very important to database integrity. I have three entities, Team, Player, Match with following relationships
Team <--->> Player
Player <--->> Team
The above relationship is straightforward, a Team can have many players, and a Player can belong to multiple teams.
Match:
homeTeam <---> Team
awayTeam <---> Team
In my Match entity, I have two properties homeTeam and awayTeam. Currently, their destination is set to Team with no Inverse relationship. Though application works I don't like the fact there is no inverse relationship to a match from a team. So, I am trying to figure what is the best way to setup inverse relationship for the Team entity. Also, I can't setup a one-to-one inverse relationship from team to match, since a team can play many matches. So, my initial thought is I can have a property matches in Team and make them the inverse relationship to a Match. Will this scenario work? or Do I need to create two inverse relationship properties like homeMatches, awayMatches in Team?
Thanks for any thoughts.
Javid