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

Insert with 'bypassCollection2: true' throws an exception #448

Open
pmogollons opened this issue Mar 31, 2024 · 2 comments
Open

Insert with 'bypassCollection2: true' throws an exception #448

pmogollons opened this issue Mar 31, 2024 · 2 comments

Comments

@pmogollons
Copy link

When inserting a document with options, like to bypassCollection2 it throws an exception.

collection.insertAsync(doc, {bypassCollection2: true})

Exception in Mongo write: TypeError: object is not a function
at packages/mongo/mongo_driver.js:322:1
at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1)

To Reproduce

Steps to reproduce the behavior:

  1. use insertAsync with an options object
  2. You get the error

Expected behavior

insertAsync should accept a 2nd param with options

Additional context

This is related to #290. This was fixed in 91c6462, but only for .insert method as async methods were not a thing at that time.

Copy link

Thank you for submitting this issue!

We, the Members of Meteor Community Packages take every issue seriously.
Our goal is to provide long-term lifecycles for packages and keep up
with the newest changes in Meteor and the overall NodeJs/JavaScript ecosystem.

However, we contribute to these packages mostly in our free time.
Therefore, we can't guarantee you issues to be solved within certain time.

If you think this issue is trivial to solve, don't hesitate to submit
a pull request, too! We will accompany you in the process with reviews and hints
on how to get development set up.

Please also consider sponsoring the maintainers of the package.
If you don't know who is currently maintaining this package, just leave a comment
and we'll let you know

@harryadel
Copy link
Member

Can you give the new version 4.0.2-beta.1 a try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants