Storing Metadata on "Unowned" Docs

Hey all,

just thinking through another idea and wondering if anyone had feedback on something similar:

Currently in our app, a user can “own” documents, like an article for instance. User A has authored an article, has write access, etc. User B can “read” the article in that they can navigate to a url and see the article’s contents. Now we want to extend our permissions to allow User B to own metadata based on that article. That metadata would only be accessible to the author of the metadata (User B in this case).

We are also leaning towards allowing the users to construct their own metadata fields, which would result in either a schema-less or dynamic schema that can be checked against when doing validations, etc.

My thought right now is to have a Metadata collection that references the owner of the metadata (User B) and the related doc (Article). Putting this type of metadata right on the original doc just feels wrong to me.

Feedback appreciated =)

Yes, that’s definitely the way to go. It can be counter intuitive since mongo is a document database but meteor actually works best with this type of normalized data structure.