You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Handle timestamps on arbitrarily deep subdocs #8809
just reporting an observation here. I have read the conversation at #8799 and thought to just report this at the moment and see if I can fix this later.
Mongoose: courses.findOneAndUpdate({_id: ObjectId("6656a85459ca496d399a2729")},{$setOnInsert: {created_at: newDate("Sat, 01 Jun 2024 05:25:23 GMT")},$set: {updated_at: newDate("Sat, 01 Jun 2024 05:25:23 GMT")},$push: {"modules.$[].lessons.$[].points.$[point].scenes": {$each: [{position: 1,narration:
"Welcome to the module on Basics of Options Trading. In this lesson, we will explore the key differences between options and stocks.",_id: ObjectId("665ab0c323c811da3abe8c61"),},{position: 2,narration: "Let's start by understanding the fundamental distinction between options and stocks.",_id: ObjectId("665ab0c323c811da3abe8c62"),},],},},},{arrayFilters: [{"point._id": ObjectId("6656a85459ca496d399a272d")}],runValidators: true});
currently it is only updating at the root level (as shown in the debug output).
Let me know if I am right in considering the core problem that has to be determined/solved.
how to determine the level at which we have to put the timestamps from the query?
and then where to update the timestamps
at the nearest ancestor schema with timestamps enabled and stop.
at all the ancestor schemas with timestamps enabled while bubbling up till root.
I have not read the code and it will really take a lot of time to find any edge cases. While I do that, let me know your opinions/suggestions.
Activity
Hackerbee commentedon Jun 1, 2024
just reporting an observation here. I have read the conversation at #8799 and thought to just report this at the moment and see if I can fix this later.
Here's the query I'm running.
debug output:
currently it is only updating at the root level (as shown in the debug output).
Let me know if I am right in considering the core problem that has to be determined/solved.
I have not read the code and it will really take a lot of time to find any edge cases. While I do that, let me know your opinions/suggestions.
Merge branch 'Automattic:master' into fix/Automatticgh-8809-deep-subd…