V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐工具
RoboMongo
推荐书目
50 Tips and Tricks for MongoDB Developers
Related Blogs
Snail in a Turtleneck
watert
V2EX  ›  MongoDB

无法理解mongoose画蛇添足地添加schema

  •  
  •   watert · Mar 19, 2013 · 5607 views
    This topic created in 4791 days ago, the information mentioned may be changed or developed.
    mongodb的一个巨大优势就是schema-less,mongoose这就是扼杀了这个优势
    ORM也不见得就一定要schema吧?
    3 replies    1970-01-01 08:00:00 +08:00
    chloerei
        1
    chloerei  
       Mar 19, 2013   ❤️ 1
    这其实是在给应用设定 schema,不然应用中很多地方都要写判断代码

    if (article.title) {
    // parse title
    }

    schema-less 目前只发现数据采集的场合是会用到的。
    heroicYang
        2
    heroicYang  
       Mar 20, 2013
    schema-less is not no-schema...
    leafduo
        3
    leafduo  
       Mar 20, 2013
    schemaless 主要是可以随便变模式,真是应用里没模式怎么搞?模型用什么来代表?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2566 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 12:38 · PVG 20:38 · LAX 05:38 · JFK 08:38
    ♥ Do have faith in what you're doing.