A elegant way around purging documents?

2014-11-25 Thread Stefan Klein
Hi couch users, I got a main database and a database per user. A users Db is replicated to his device (mobile phone) - idea is as much functionality should be available offline. To simplify a bit, let's say i got documents of type item and of type image, each item may reference multiple images

Re: A elegant way around purging documents?

2014-11-25 Thread Jan Lehnardt
Heya Stefan, just a quick note: Purge is definitely the wrong approach. I’ve been trying to solve something similar recently for a client and we didn’t come up with a conclusive solution. I’d love for CouchDB and PouchDB to natively support this use-case, but this is currently not possible as

Re: A elegant way around purging documents?

2014-11-25 Thread Sebastian Rothbucher
Hi Stefan, as you delete per User-DB only, can you also CREATE per User-DB only. This way, you'd lose replication as a feature, but why not have a different Doc-ID and storing the original doc-ID in some field (so _id=123 on the central DB would become _id=345, originalid=123 on the user's