mongodb - Using positional operator with two-level hierarchies in Mongo -


i have hierarchy of, let say, posts -> comments -> votes.

how update vote on comment?
comment comments.$, can't comments.$.votes.$.

you cann't right now(there such bug in jira). suppose can update using server side side javascript. check article more details.

another way redesign db scheme 1 level deep, example in case of post-> comments-> votes move comments(or votes) in separate collection.


Comments

Popular posts from this blog

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -

jQuery clickable div with working mailto link inside -