jo / couchdb-best-practices

Collect best practices around the CouchDB universe.
https://jo.github.io/couchdb-best-practices/
Other
321 stars 33 forks source link

Why is using forward slashes in _id discouraged? #40

Closed tlvince closed 9 years ago

tlvince commented 9 years ago

Per https://github.com/eHealthAfrica/couchdb-best-practices/issues/39

jo commented 9 years ago

http://docs.ehealthafrica.org/couchdb-best-practices/#a-note-about-/-in-document-ids

@gr2m do you want to add anything?

gr2m commented 9 years ago

Fantastic work!!!! I'd love to be able to deep link to sections, I'll add a separate issue for that (I mean, while reading, I'd like to get the #anchor URL of the titles, like in GitHub READMEs)

If you need multiple independend unique properties per document you can create reserve documents for those properties.

What do you mean with reserve documents?

conflicts

We thought a lot about conflict management, and we have a dream API for future-hoodie: https://github.com/hoodiehq/wip-hoodie-store-on-pouchdb/issues/32. Maybe something interesting in there for https://github.com/jo/pouch-resolve-conflicts

jo commented 9 years ago

reserved documents are meant as a way to enforce uniqueness for certain values, and are linked to the mother document via a 1:1 relation. But I have removed that sentence because it has several implications and would not fit in here.