jerryge
V2EX  ›  Node.js

从 mongodb 切换到 mongoose 引发的问题

  •  
  •   jerryge · Apr 3, 2014 · 4281 views
    This topic created in 4426 days ago, the information mentioned may be changed or developed.
    从mongodb切换到mongoose 到后,mongoose没有办法读取修改mongodb创建的表和数据。对mongoose自己创建的表是可以的。请教,这是何解?
    8 replies    1970-01-01 08:00:00 +08:00
    airyland
        1
    airyland  
       Apr 3, 2014
    试试 _id:false ?
    jerryge
        2
    jerryge  
    OP
       Apr 3, 2014
    @airyland 不行
    ijse
        3
    ijse  
       Apr 3, 2014
    有什么提示吗? 是不是定义的Schema不对。。
    jerryge
        4
    jerryge  
    OP
       Apr 3, 2014
    @ijse 没有错误提示,schema 检查好多边的。
    vietor
        5
    vietor  
       Apr 3, 2014
    versionKey ?
    rexren
        6
    rexren  
       Apr 4, 2014
    实在不行做一次migration就可以了
    jerryge
        7
    jerryge  
    OP
       Apr 4, 2014
    @vietor 好像不是这个问题。
    lijinma
        8
    lijinma  
       Apr 5, 2014
    把你的关键代码贴一下?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2403 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 16:11 · PVG 00:11 · LAX 09:11 · JFK 12:11
    ♥ Do have faith in what you're doing.