Closed willshulman closed 7 years ago
And then we need to add unit tests to carbon-client-js
Let's also add to InsertObjectConfig a flag called returnInsertedObject that defaults to false. Might also have to change carbon client to do the right thing in both cases.
:selfie: f29f4a3
In carbond:
At same time we should update CarbonClient to return for insert and save (upsert case -- or whatever leafnode does) the object passed in with _id updated.
Wrote this code:
which I use in insert and saveObject in collection.js (in carbon-client-js).
BUT... I realize the path in the location header will not have the proper EJSON form of the new _id values. So.... I wonder if we should add an _id header just for CarbonClient (since Carbon Client is the only code that would be setting back an _id on the object passed to the op). We would then EJSON.parse the header value to set the _id back.