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
updateCollectionWithOptions uses encodeKeyWhenUseObjectId that assumes that the _id is at the top level of the JsonObject, if an update is of the form:
{
$set:{
_id='an-id',
foo:'bar'
}
}
The _id is nested so it will fail to encode the _id and throw an exception.
It may seem odd to have _id in an update, but I have tested with the mongo command line client and it accepts _id in the update provided it does not change the value. If we dont encode it we would probably need to warn people that their code needs to filter out _id from any updates.
The text was updated successfully, but these errors were encountered:
updateCollectionWithOptions
usesencodeKeyWhenUseObjectId
that assumes that the _id is at the top level of the JsonObject, if an update is of the form:The _id is nested so it will fail to encode the _id and throw an exception.
It may seem odd to have _id in an update, but I have tested with the mongo command line client and it accepts _id in the update provided it does not change the value. If we dont encode it we would probably need to warn people that their code needs to filter out _id from any updates.
The text was updated successfully, but these errors were encountered: