The Minimongo insert/update/remove handlers are now implemented as
standard method invocations over the wire, though the client and server
implementations remain separate code paths.
Return values from server-side methods now get sent back to the client
via a 'result' message, but that result isn't wired up to anything
client-side yet.
Server now informs client when outstanding subscriptions and methods
invocations are fully reflected in 'data' messages back to the client.
For now, high-level behavior is the same. When the transport
disconnects, client doesn't attempt to reuse previous session.
Server always establishes a new Live Data session with each connect.
Server does not support method reply cache, and won't honor a client's
attempt to reuse a previous Live Data session id.
* remove() removes all documents in collection (previously, had to
explicitly pass {} selector to MM).
* update() requires {multi: true} to update multiple documents.
Previously we defaulted to true, now multi defaults to false.
In Livedata and Minimongo, make falsey selectors match no documents,
instead of all documents. Same for {_id: undefined}. This is a
departure from most MongoDB drivers, but offers a safety belt around
selectors that are rarely useful and easy to accidentally create
programmatically.
For remove(), also protect against accidentally destroying an entire
collection when passing no args. To empty a collection, pass the
wildcard selector explicitly: foo.remove({});
For find(), keep the standard mongo behavior of returning all documents
when no selector is passed in by explicitly checking arguments.length.
This change also makes typical read cases cleaner, allowing:
x = foo.findOne(Session.get('foo_id'));
instead of
x = Session.get('foo_id') && foo.findOne(Session.get('foo_id'));