> On Oct 13, 2014, at 3:59 PM, Christoph Berlin <[email protected]> > wrote: > > But then its get relatively cumbersome to share as I need to add a user to > members AND members_readwrite and they can get easily out of sync.
Adding an entry to two arrays in a single document shouldn't be too cumbersome. If you're worried about inconsistency, write the client code so there's only one function/method that updates these properties. > Do child objects (documents) of parent documents inherit permissions > automatically or do I have to assign channels individual and if so how? There's no inherent relationship between any two documents. You can have one document refer to another by incorporating its ID as a property, but that's just a convention. Strong relationships (like foreign keys in relational DBs) aren't practical in distributed systems because there's no practical way to enforce multi-document transactions. I don't think this should be a problem for your model, though. Or do you really need every one of a user's documents to have its own independent set of access privileges? —Jens -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/A3E90B35-B57C-4115-A81B-2189B4D926FD%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
