3 ms·
MongooseJS is pretty cool. I have one question, though: Why must you define models' schema when you're interacting with a schema-less database such as MongoDB?
by nickh 16y ago
MongooseJS is pretty cool. I have one question, though:
Why must you define models' schema when you're interacting with a schema-less database such as MongoDB?
- nicholaswyoung 16y agoSo, if anyone from the Mongoose team is around, please correct me if I'm wrong - but defining a model's schema helps mostly in scenarios where you would typecast or otherwise transform attributes. It's more about helping you easily use data that's retrieved from the DB more than about defining a schema.