This is my publication, I’m using publish-composite package
Meteor.publishComposite('groups',{
find: function(){
return Organizations.find({accountsArr: this.userId});
},
children: [
{
find: function(group){
return Groups.find({_id: {$in: group.groups}});
}
}
]
})
I have a colection called organizations and organizations have groups.
User can join organizations, I want to send all the groups data of an organization user is part of.
one group can be part of multiple organizations.
I’m afraid that I’m sending same group record multple times, which is waste of bandwidth.
Am I correct? or Meteor will not send duplicate records to client?
Is there any better way to do this?