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
Post a Comment