Reputation: 261
I added data directly to mongodb and now i'm missing the _etag, _created and _updated fields. How do I generate these for documents that don't have them?
Thanks,
Upvotes: 1
Views: 582
Reputation: 6576
A GET
on those document will transparently get those meta for you. The two date fields will probably default to epoch; etag will be computed for you. This way you will then be able to make conditional requests (PUT
, PATH
, DELETE
) on the documents, like they were inserted via the API. Remember you can also opt to disable conditional requests altogheter
Upvotes: 1