You can have multiple publish and subscriptions to the same collection. In your view, just make sure to filter the local collection to pull out what you want.You can also reactively subscribe to collections.---The autopublish package is useful for development because it publishes and subscribes to every collection automatically – so don’t forget to remove that before deploying.
Query collections with the mongo operators
View all the operators here:http://docs.mongodb.org/manual/reference/operator/
There are a few limitations on minimongo (operations on client collection).Overcome the limitations by performing these behind server methods, the server collections have access to the full mongo api.See detailed limitations here https://github.com/meteor/meteor/blob/devel/packages/minimongo/NOTES
find() returns a cursor and unless you specify otherwise, it will be reactive.---forEach, map, fetch – each can only be called once until you call rewind()Observe and observeChanges
Observe allows you to watch for when a query changes.observeChanges is more performant than observe, but only sends the fields that changed
The insert function on a collection takes a document.--Update takes a selector (same as find) or an id, and a mongo modifier.If a modifier doesn't contain any $-operators, then it is instead interpreted as a literal document, and completely replaces whatever was previously in the databaseIf you are on the server, you can specify that it should update all matching documents (it defaults to only updating one document).--Remove takes a selector.--Insert, update and remove all have an optional last parameter for a callback that passes an error (if there was one).
Validate insert, update, and remove functions to prevent malicious client updates and to enforce validation.Meteor has a check package which makes input validation much easier: http://docs.meteor.com/#matchThere is also a deny function, which is the opposite of the allow function.