Hi guys,

before reading the docs I was afraid of creating custom _ids.
But the docs [1] even says that we shouldn't rely on the auto generated UUID.

Our primary goal is to create more human readable _ids.
So, in order to avoid conflicts, the idea is to introduce scoped custom _ids 
which starts e.g. with a leading namespace followed by a short id, e.g.:

INV-HG6FU

(The length of the short id depends on the expected number of documents for a 
certain scope/doc type)

However, before going this way I would like to know if there are any drawbacks 
with such approach and how others achieve this.
Or should we rather rely on the auto-UUID and move custom ids into its own 
document property, something like e.g. "publicId"? 

Many thanks in advance!

Olaf

[1]
https://docs.couchdb.org/en/stable/best-practices/documents.html#don-t-rely-on-couchdb-s-auto-uuid-generation


Reply via email to