3 ms·
Some ODMs like Mongoid have a strict mode that requires a field to be mapped in order to save it to the db. This saves you from typos wrecking havoc. You should
by bricestacey 15y ago
Some ODMs like Mongoid have a strict mode that requires a field to be mapped in order to save it to the db. This saves you from typos wrecking havoc. You should probably unit test your queries anyway.
- gregwebs 15y agoyep, either use an ODM (or some system that guarantees correctness) or make sure your raw queries are well tested.
- FuzzyDunlop 15y agoYeah. Mongoose on Node requires you to code and instantiate a document schema before you can do anything with the database. Gotta sacrifice some flexibility for a bit of safety.