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
Mongoclient stores the _id field as a string rather than an ObjectId when useObjectId == false (default value).
This behavior was introduced in the pull request for issue #36. See JsonObjectCodec#generateIdIfAbsentFromDocument.
The main issue caused by this is that not all commands (can) ensure this behavior, eg: updateWithOptions, when used as an upsert, will create an ObjectId - see #97 - resulting in multiple id representations in the DB.
An additional disadvantage is that using string values for _id requires more storage space per document than an ObjectId.
The text was updated successfully, but these errors were encountered:
@DieterDePaepe We've taken a look and agree that #97 is a bug and have put a help wanted label on that. Hopefully a community contributor fixes it in the holiday break. Please open more issues if you find that useObjectId is not being honoured elsewhere.
Mongoclient stores the
_id
field as a string rather than anObjectId
whenuseObjectId == false
(default value).This behavior was introduced in the pull request for issue #36. See
JsonObjectCodec#generateIdIfAbsentFromDocument
.The main issue caused by this is that not all commands (can) ensure this behavior, eg:
updateWithOptions
, when used as an upsert, will create anObjectId
- see #97 - resulting in multiple id representations in the DB.An additional disadvantage is that using string values for
_id
requires more storage space per document than anObjectId
.The text was updated successfully, but these errors were encountered: