[SERVER-36996] Regarding Update Multi Created: 05/Sep/18  Updated: 05/Sep/18  Resolved: 05/Sep/18

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Avinash [X] Assignee: Nick Brewer
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

db.tnAssetCache.update(
{},
{ $pull:{OrderList:
{"orderCompletedDate":{"$lte":ISODate("2017-07-25T20:33:53.695Z")}}}},{ multi: true }
)

db.tnAssetCache.update(
{"orderList.orderCompletedDate":{"$lte":ISODate("2017-07-25T20:33:53.695Z")}},
{ $pull:{OrderList:
{"orderCompletedDate":{"$lte":ISODate("2017-07-25T20:33:53.695Z")}}}},
{ multi: true }
)

 



 Comments   
Comment by Nick Brewer [ 05/Sep/18 ]

Thanks for your report. Please note that SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag. A question like this involving more discussion would be best posted on the mongodb-user group.

-Nick

Comment by Avinash [X] [ 05/Sep/18 ]

Some one can you please help me out in this issue i am pulling subdocument if its orderCompltedDate is less than year for current date but while we use above query it is working but always updating if no records also but if i use second query it is  not working how can we resolve this issue

 

Generated at Thu Feb 08 04:44:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.