[SERVER-1690] justOne flag for updates Created: 26/Aug/10  Updated: 06/Oct/18  Resolved: 06/Oct/18

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

Type: Improvement Priority: Major - P3
Reporter: Mathias Stearn Assignee: Unassigned
Resolution: Won't Fix Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-1581 change update() to be consistent with... Closed
Participants:

 Description   

add a justOne flag to updates and eventually (1.9.x) ignore multi flag. This will be more consistent with delete and a more sane default.



 Comments   
Comment by Scott Hernandez (Inactive) [ 27/Feb/12 ]

Colin: I've linked the issue for that as well.

Comment by Colin Mollenhour [ 26/Feb/11 ]

if we're adding a new flag, what about updating with a sort and limit? e.g. {multiple: true, sort:

{'foo.bar': -1}

, limit: 10} equivalent of UPDATE ... ORDER BY foobar LIMIT 10

Comment by Eliot Horowitz (Inactive) [ 17/Nov/10 ]

updateOne() would be the driver name, but it needs a flag to work

Comment by Remon van Vliet [ 17/Nov/10 ]

It would probably be cleaner to have a findOne equivalent of update rather than add a flag. E.g. find/findOne versus update/updateOne.

Generated at Thu Feb 08 02:57:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.