Welcome to the new MongoDB Feedback Portal!
{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.
We’ve upgraded our feedback system to better capture, track, and act on your feedback. Here’s what you need to know:
|
What problem are you trying to solve? Focus on the what and why of the need you have, not the how you'd like it solved. |
We regularly want to upsert documents to mongo, and include a useful createdAt and updatedAt timestamp. |
|
What would you like to see happen? Describe the desired outcome or enhancement. |
I'd like a setOnUpdate operator, which only applies the provided data to the record if something else changed due to $set or $setOnInsert. |
|
Why is this important to you or your team? Explain how the request adds value or solves a business need. |
We do a lot of data loading, and we want to understand how and when data changes. Having stats like "every record was updated" when really only a handful were prevents us from understanding how well our data loading is working, and amongst other things, how often we are getting new data. |
What steps, if any, are you taking today to manage this problem? |
We choose simplicity and broken stats, but we're not happy about it. |
Thank you for your feedback! We agree that this is a reasonable feature request and the use case you are describing is challenging to solve with the current featureset. Although it is unlikely that we will be expanding the 'classic' update modifiers, we will consider solutions for this. Meanwhile, you can check discussions in this related ticket, SERVER-42084, for some ideas of potential workarounds using pipeline updates with $cond.