Basic pub/sub problem—filtering doesn't seem to work


#1

lib/collections.js:

Meetings = new Meteor.Collection('meetings');

server/publications.js:

Meteor.publish("meetings", function () {
  return Meetings.find({"participants":this.userId}, {"log":0});
});

client/homeLoggedIn.js:

Meteor.subscribe("meetings");
...
var data = Meetings.find().fetch();

The problem is that data shows the log field. What am I missing?

Thanks all :smile:
—t3db0t


#2

Try to use { fields: { log: 0 }} just like this :wink:


#3

D’oh—thank you. I was once again waylaid by Mongo docs vs. Meteor docs :wink: