Cheez
V2EX  ›  Node.js

如何在 Mongoose 里面获取子文档的兄弟?

  •  
  •   Cheez · Feb 5, 2021 · 2187 views
    This topic created in 2102 days ago, the information mentioned may be changed or developed.
    我的子文档的虚拟属性,需要获取同数组的兄弟们的属性,才能够给出值。可以理解为一种特殊的排名,可是该怎么获取呢?
    Cheez
    Cheez
    OP
    Feb 6, 2021
    1
    用 parentArray 同时设立一个 flag 把自己过滤掉
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   670 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 18:15 · PVG 02:15 · LAX 10:15 · JFK 13:15
    ♥ Do have faith in what you're doing.