-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
With respect to the returnDocument option (mapped to new in outgoing commands) for findAndModify operations, the CRUD spec states:
This option is sent only if the caller explicitly provides a value. The default is to not send a value.
Similar guidance is provided for the upsert option.
PHPLIB defaults both fields to false (along with remove), and always sends them in outgoing commands. We should either consider relaxing the behavior for new and upsert, or amending the CRUD spec to permit this behavior.
FWIW, the server's own defaults for these options is false and I think it'd unlikely that would ever change (based on previous discussions on update's defaults).