Skip to content

Issue with query_objectid_as_string on Eve>=1.0.1 #1468

@micaelmalta

Description

@micaelmalta

While migrating from Eve 1.0.0 to 1.0.1, we are seeing unexpected result with query_objectid_as_string and versioning

Expected Behavior

if query_objectid_as_string is set to true, mongo queries should not be cast as ObjectID

{ find: "string_id_accounts", filter: { _id: 'xxx' }

Actual Behavior

if query_objectid_as_string is set to true, mongo queries are cast as ObjectID

{ find: "string_id_accounts", filter: { _id: ObjectId('xxx') }

Environment

  • Python version: >=3.6
  • Eve version: >= 1.0.1

POC

https://github.com/micaelmalta/poc_eve

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions