NODE-8011Backlog

[Mastra] Reject bring-your-own documents whose _id isn't a string or ObjectId

h2. TL;DR Query results turn every document {{_id}} into a string. For {{_id}} types other than string or ObjectId, that string no longer matches the stored value, so lookups by that {{id}} silently find nothing. Fail with a clear error instead. h2. Context With a bring-your-own (BYO) collection, {{query()}} returns each document's {{_id}} as the string {{id}} field of the result, using {{toString()}}. Mastra matches an {{id}} back to a document as a string, and also as an ObjectId when it's a

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue
ABX
Labels
Tags and classification
node-internal