It seems this.transform() is retrieving more data than is sent by an update/insert call. So is it making an additional read to the database to get it?
And if I don't use transform without a parameter, will it make that read anyway, i.e. if I do instead: this.transform(modifier.$set) as an optimization?
Or am I missing something about this whole thing for why the server already has the entire document. I'm operating under the assumption it doesn't have the entire document. Rather the client sends the minimum # fields I'd like to change to the server, and the server does the same passing that on to Mongo, without ever having full knowledge of the document. So I guess the question is: is this.transform() lazy?
It seems
this.transform()
is retrieving more data than is sent by anupdate/insert
call. So is it making an additional read to the database to get it?And if I don't use
transform
without a parameter, will it make that read anyway, i.e. if I do instead:this.transform(modifier.$set)
as an optimization?Or am I missing something about this whole thing for why the server already has the entire document. I'm operating under the assumption it doesn't have the entire document. Rather the client sends the minimum # fields I'd like to change to the server, and the server does the same passing that on to Mongo, without ever having full knowledge of the document. So I guess the question is: is
this.transform()
lazy?