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

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -