-
Notifications
You must be signed in to change notification settings - Fork 235
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 driver 4.x support for Mongo Altas Serverless #638
Comments
@apocist, thanks for your suggestion. Would you like to submit a PR? |
+1 add on a complete refactor of the ogre that is https://github.com/loopbackio/loopback-connector-mongodb |
I've already actually made a working version for some projects at https://github.com/Sitetheory/loopback-connector-mongodb/tree/mongodb-driver-4.x that can be tested via npmjs with @sitetheory/loopback-connector-mongodb full tests aren't complete and will break 3.x compatibility (due to driver changes), but I can make a PR now if wanted (can do so in morns) |
I've checked the version from @apocist and it is working properly as expected with mongodb driver 4.x, I also have checked PR #639 that has been closed by the stale bot. Don't know the exact reason but since I don't know @apocist availability to reopen it I'm going to open a new one between today/tomorrow with his changes so we can continue discussion and implement anything required to make the official connector running with driver version 4.x, required as mentioned to use MongoDB Atlas connections and loadBalance option. |
I've since stopped maintenance on the #639 changes as we've moved away from using Mongo Altas Serverless due to some limitations, but it's usages still seems effective with mongodb ^4.1.0 |
One day later than expected, but I've finally created promised pull request #672 with only one pending to check test, failing due to bson.ObjectId upgrade that cause object instances to be indetectable to lodash isEmpty function. This generates a new unwanted behaviour on model relationships when filtering by only one resulting id property instance after intersect possible ids and where filter one(s). Since ObjectId instances are now indetectable to isEmpty function current loopback-datasource-juggler repo logic assumes that is not needed to send query to connector since at his eyes cannot be a result so immediately fire callback with empty result. |
Suggestion
I suggest updating the dependency for MongoDB nodejs driver ^4.1.0
Use Cases
The latest MongoDB driver allow access to MongoDB Altas cloud infrastructure and loadBalanced databases. Connection to this atlas service is impossible with the 3.x series at this time.
Examples
https://github.com/mongodb/node-mongodb-native/blob/4.0/docs/CHANGES_4.0.0.md
https://github.com/mongodb/node-mongodb-native/releases/tag/v4.1.0
Acceptance criteria
TBD - will be filled by the team.
The text was updated successfully, but these errors were encountered: