Hi Mike,
no, it's currently not on the roadmap. Opening a feature request on Github is a good idea. If you could do that, that would be nice.
About the feature itself, my understanding is as follows:
The general form is:
db.collection.findOrCreate(searchAttributes, createAttributes);
The operation result is:
- look for a document with searchAttributes in collection
- if no such document exists,
create it by merging the searchAttributes and the createAttributes,
finally return the created document
- if such document exists,
return the first one. In case multiple such documents exist, return one
of them (which one is undefined)
Is that correct?
Best regards
Jan