This repository has been archived by the owner on Feb 4, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sessions): add
toBSON
method to ClientSession
Fixes NODE-1518
- Loading branch information
d95a4d1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At a high level this makes sense and I don't have any ideas how to improve this. Just want to point out that the downstream impact isn't pleasant for people looking to print out their options: Automattic/mongoose@fc76fe4 .
d95a4d1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vkarpov15 I didn't realize that mongoose implemented a custom print function for this. What is the goal of printing out the BSON version instead of the raw options?
d95a4d1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Primarily for custom schema types, re: Automattic/mongoose#4356 and http://mongoosejs.com/docs/customschematypes.html .