Okay, say I did this. In the validate_doc_update, if someone tries to delete a doc, would I
be able to modify the new doc and remove the _deleted field and just empty the doc myself
- basically creating my own tombstone?
- Jim
Sent from my iPhone
On Nov 20, 2012, at 10:12 PM, "Benoit Chesneau" <bchesneau@gmail.com> wrote:
> just empy the doc instead of deleting it?
>
> On Wed, Nov 21, 2012 at 2:06 AM, Jim Klo <jim.klo@sri.com> wrote:
>> Question: Is there a way in CouchDB to enforce an immutable _id? Say I
>> delete a document - which leaves the deleted tombstone around. Is there a
>> way I can prevent someone from recreating that doc with the same _id?
>>
>> Can validate update function handle this? (i.e. if new_doc._id !~
>> /^_design\// and prev_doc._deleted != false) I'm not sure if deleted docs
>> get passed to validate update function.
>>
>> Thanks,
>>
>> - Jim
>>
>> Jim Klo
>> Senior Software Engineer
>> Center for Software Engineering
>> SRI International
>> t. @nsomnac
>>
|