I have a document as shown below in Mongodb:
Now, I want to go to a document based on specific "_id
" and for that document, want to go to "schedule" list in which for the few specific dates (not only one date, but more than one), I want to update the status as "BOOKED".I went through this link,
How to apply update using Filtered positional operator with arrayFilters
but in MongoTemplate class, updateMulti
method does NOT take the updateOption
parameter. Can someone please help
Me out. really will be appreciated for any suggestion. Thanks.
Note: I am using spring-data version "2.0.3.RELEASE", MongoDB driver version is v3.6.4.
Below is a document:
{
"_id": "x1",
"timeZone": "America/Los_Angeles",
"schedule": [
{
"Date": "2018-07-10T00:00:00.000Z",
"status": "AVAILABLE"
},
{
"Date": "2018-07-10T00:30:00.000Z",
"status": "AVAILABLE"
},
{
"Date": "2018-07-10T08:00:00.000Z",
"status": "AVAILABLE"
}
],
"_class": "com.scheduler.persistance.model.Calendar"
}