Quantcast
Channel: User pahan - Stack Overflow
Viewing all articles
Browse latest Browse all 42

Answer by pahan for Can you predefine allowed fields on documents in Meteor/MongoDB?

$
0
0

This is my personal preference. Because fieldNames param inCollections.update(userId, doc, fieldNames) only gives top-level fields in doc. So if you are having nested fields it is very hard to track.

So I don't use collection allow/deny rules. Without allow deny rules Collections.insert/Collections.update does nothing on client. Instead I am using Meteor methods to update/delete documents to collections, so I can decide which exact fields should update/insert.


Viewing all articles
Browse latest Browse all 42

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>