Automattic / Automattic/monk

_id is never casted to id string

Open
#262 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.8k
Forks
180
PR merge metrics
No merged PRs in 30d

Description

Is there a setting I need to use to cast _id object id into a hex string? The docs says it’s enabled by default, but I get object id instead of a string id for my queries.

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file or test is named. Start by checking the documentation claim about the default _id casting and reproduce the query result with a MongoDB ObjectId; trace the query handling that determines whether _id is returned as an ObjectId or hex string. Done means the documented default behavior and actual query result agree, with coverage for the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.