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
Monk always casts any _id parameter that's a string into a BSON ObjectID. This prevents the insertion of new records that use a string _id that doesn't conform to ObjectID spec and it prevents the retrieval of existing records.
Is this restriction by design? Sometimes it's nice to be able to assign your own unique string identifiers (e.g., for upserting stats data).
Not sure if or how you'd want to support this. Maybe a global option to not auto-cast these ids? Happy to work on a pull request if you're OK supporting the feature.
The text was updated successfully, but these errors were encountered:
It looks like this issue (or one very similar) just started happening again sometime between 0.81 and 0.9. I was able to insert using custom ids before and now I get exceptions when using non-ObjectID compliant strings.
Monk always casts any
_id
parameter that's a string into a BSON ObjectID. This prevents the insertion of new records that use a string_id
that doesn't conform to ObjectID spec and it prevents the retrieval of existing records.Is this restriction by design? Sometimes it's nice to be able to assign your own unique string identifiers (e.g., for upserting stats data).
Not sure if or how you'd want to support this. Maybe a global option to not auto-cast these ids? Happy to work on a pull request if you're OK supporting the feature.
The text was updated successfully, but these errors were encountered: