Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoDB client transforming Date and ObjectId into empty objects #6030

Closed
takameyer opened this issue Aug 2, 2023 · 0 comments · Fixed by #6029
Closed

MongoDB client transforming Date and ObjectId into empty objects #6030

takameyer opened this issue Aug 2, 2023 · 0 comments · Fixed by #6029

Comments

@takameyer
Copy link
Contributor

takameyer commented Aug 2, 2023

The following code ends up saving an empty object in the Atlas Collection:

   const document = {
      _id: new ObjectId(),
      createdAt: new Date(),
    };
    user
      .mongoClient('mongodb-atlas')
      .db('chat')
      .collection('messages')
      .insertOne(document);
  };

Something is transforming the arguments on the way to the client. This was not present in v11.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant