incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject Re: immutable _id's
Date Wed, 21 Nov 2012 06:12:02 GMT
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
>

Mime
View raw message