gancl
V2EX  ›  Node.js

mongoose 怎么在子文档的 array 里 update 或 insert?

  •  
  •   gancl · Jun 6, 2014 · 4694 views
    This topic created in 4405 days ago, the information mentioned may be changed or developed.



    这是一个类似iOS game center分数排行榜的数据库, 一个游戏里有多个item项目, 每个项目有多个玩家的分数数据.
    document里包含了subDoc子文档,子文档里又有一个array,怎么找到这个array里的某个值,并对它进行修改?
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2498 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 15:57 · PVG 23:57 · LAX 08:57 · JFK 11:57
    ♥ Do have faith in what you're doing.