MongoDB - Query on the last element of an array?

后端 未结 9 1103
醉梦人生
醉梦人生 2020-11-29 06:51

I know that MongoDB supports the syntax find{array.0.field:\"value\"}, but I specifically want to do this for the last element in the array, which means I don\'

9条回答
  •  北海茫月
    2020-11-29 07:37

    I posted on the official Mongo Google group here, and got an answer from their staff. It appears that what I'm looking for isn't possible. I'm going to just use a different schema approach.

提交回复
热议问题