Introducing the official MongoDB for Developers YouTube channel! ✨
From beginner tutorials to comprehensive technical analysis, get NEW resources weekly to level up with the MongoDB data platform.
Subscribe: mongodb.social/6019her79
Mongoose Studio v0.2.10 released, now with a "Auto-Refresh" option on the document details page. Auto refreshes the document when it changes.
Uses @MongoDB change streams under the hood 😎
Save your F5 key!
github.com/mongoosejs/studio…
🚨 Mongoose Tip! 🚨
Using `default: null`? Think again!
Setting a field to `default: null` forces you to serialize that property in JSON, which can harm performance. Just leave it undefined!
Less bloat, better efficiency. Your future self will thank you! 💪💻
🚀 Pro tip for Mongoose devs: Use the `pre('save')` hook to update computed properties only when necessary, especially when dealing with API calls!
Check out how we update shipstationShippingOptions based on changes to the cart items, city, state, or zip.
🚀 Version 9.1.4 is here!
🔧 Fixed session attachment to docs retrieved by cursor
🔍 Enhanced `hydrate()` to handle nested schema arrays
🔄 Resolved issues with parent docs in map & array subdocuments
Check out the full changelog for more details! github.com/Automattic/mongoo…
🚀 Version 9.1.3 is here!
🔧 Fix for `insertMany()` to support timestamps option
🔍 Enhanced error previews for query updates
📝 Improved type casting for subdocument paths
Check out the full changelog! github.com/Automattic/mongoo…
🚀 Pro tip: Did you know that when you upsert, MongoDB handles nested paths with grace? Check this out! 👇
Delightful DX like this is what sets MongoDB apart. You never need to initialize nested objects manually!
🚀 Mongoose 9.1.2 is here!
🔧 Fixed subdocument pre-save hook options handling
⚡ Improved performance by selecting only _id during document existence checks on save()
Check out the complete changelog for more details!
github.com/Automattic/mongoo…
Mongoose 9.1.0 released
⭐️ Make pathsToSave handle saving just a subpath of a modified path
⭐️ Pass options to pre('deleteOne') and update+options to pre('updateOne') hooks
github.com/Automattic/mongoo…
Mongoose 8.21.0 released
⭐️ Add support for getAtomics() to allow custom container types to utilize atomics
⭐️ Pass options to pre('deleteOne') and update+options to pre('updateOne') hooks
github.com/Automattic/mongoo…
The better question is: is there any reason to use SQL now that all common databases support transactions?
MongoDB is the default choice for modern applications. You better have a good reason to use something else 😎
Mongoose 8.20.4 released
🛠️ Ensure $isDeleted is set after calling doc.deleteOne() successfully
🛠️ Use bitwise OR to accumulate version mode flags
github.com/Automattic/mongoo…
Mongoose 9.0.2 released
🛠️ Trigger error post hook on bulkwrite when pre-hook throws an error
🛠️ Use bitwise OR to accumulate version mode flags
github.com/Automattic/mongoo…
🎄 Mongoose Studio Advent — Day 17 🎁
v0.1.17 is out with a nicer document viewer:
• Arrays now show a smart preview (no more giant JSON blobs)
• Index badges for array items
• Search + highlight virtuals and schema fields as you type
mongoosestudio.app/changelog…
Pro tip: use `uppercase: true` instead of writing your own setters
And make sure to handle null and undefined correctly if your setter is on a non-required field
Recommended pattern:
```
set: v => v == null ? v : myTransform(v)
```