I need some help to overcome a problem i have.
I have 3 collections:
Leagues: {_id: 'asdasd3ecas34', name: 'Premier League', country: 'England', level: 'A' }
Teams: {_id: '1243jd1d12d22', name: 'Manchester United', league: 'asdasd3ecas34'}
Players:
{_id: ‘a129dH13dasdd’, name: ‘Christiano Ronaldo’, no: ‘7’ },
{_id: ‘a129dH13dasdA’, name: ‘Paul Pogba’, no: ‘6’ }
How can i list ALL the players from all teams that are in that competition (Premier League)
Your model seems to be an import from a SQL database and a column from Players has not been imported, or even a complete table of team to player relations.
I am really sorry about wrong display of data.
Actually the players are as follow:
{_id: ‘a129dH13dasdd’, name: ‘Christiano Ronaldo’, no: ‘7’ , teamId: ‘1243jd1d12d22’},
{_id: ‘a129dH13dasdA’, name: ‘Paul Pogba’, no: ‘6’ , teamId: ‘1243jd1d12d22’}