I want to use lookup to take some data from a collection and put it in another collection.
Does not matter what i write in localfield or foreignfield, because takes all the data from player_game_stats and insert it in every document in player collection. I want to check if localfield and foreignField are equal, but lookup does not check this. I use NoSqlBooster for mongodb
db.player.aggregate().lookup({
from:'player_game_stats',
localField: 'player.id',
foreignField: 'player_game_stats.player_id',
as: "games"
})