3
I’m using CouchDB
and NodeJs
with these examples of documents.
Role {
_id,
name
}
User {
_id,
email,
password,
role: {
_id,
name
}
}
What is the best practice for when I update a Role
, also update it within User
if the _id
of Roles
are the same.
This is just one example, in the application will have duplicate documents cases in several parts of the bank, needing this type of update to avoid inconsistencies.