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

fix: handling of params.mongoose in transaction #358

Merged
merged 1 commit into from
Dec 6, 2019
Merged

fix: handling of params.mongoose in transaction #358

merged 1 commit into from
Dec 6, 2019

Conversation

florianbepunkt
Copy link
Contributor

@florianbepunkt florianbepunkt commented Dec 5, 2019

extend params.mongoose with session instead of replacing it

Summary

Currently beginTransaction overrides the params.mongoose object:
context.params.mongoose = { session };

This causes issues if an operations depends on mongoose/mongodb params, for example when using arrayFilters or upsert (https://docs.mongodb.com/master/reference/method/db.collection.findAndModify/#findandmodify-arrayfilters)

Not sure if there was an intentional design decision behind overwriting it. If so, some sort of whitelisting for options should be included in my opinion.

  • Tell us about the problem your pull request is solving.
    See desc
  • Are there any open issues that are related to this?
    No, I just fixed it instead of opening one
  • Is this PR dependent on PRs in other repos?
    No

extend params.mongoose with session instead of replacing it
@daffl daffl merged commit 017d509 into feathersjs-ecosystem:master Dec 6, 2019
@daffl
Copy link
Member

daffl commented Dec 6, 2019

Published as v8.1.1, thank you!

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

Successfully merging this pull request may close these issues.

2 participants