Skip to content

find tool doesn't handle ObjectId fields correctly #6

Description

@aboveaboutbelow

Issue

The find tool doesn't convert string values to ObjectId instances when querying MongoDB, causing queries on ID fields to return no results.

Current Behavior

  • String values in filter fields are not converted to MongoDB ObjectId instances
  • This affects any fields ending in "Id" or "_id" in queries
  • Queries using these fields return empty results even when matching documents exist

Expected Behavior

The find tool should automatically detect and convert string values that match the ObjectId format (24-character hex) in ID fields to proper MongoDB ObjectId instances.

Suggested Solution

Add automatic conversion for string values in fields ending with "Id" or "_id" that match the ObjectId format.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions