question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replace official MongoDB Driver

See original GitHub issue

Due to the numerous issues with the driver which make working with it far harder than it needs to be and more limiting, this issue is for the eventual removal of the official MongoDB Driver with a custom implementation.

This does mean a large loss in feature compatibility between MongoFramework and the official driver however this may be a good thing. Removing the limitations of the driver allows for more advanced querying.

Some of the reasons for this change include:

The list of reasons here isn’t exhaustive, just the ones that come to mind as I write this

Sure, a few of these things are just bugs in the MongoDB Driver and could be fixed but some are fundamental flaws with how the driver works.

This change is definitely not scheduled for Version 1 as it is a huge change - this issue is really just for putting it on the cards of things that need looking at in the future.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Turnerjcommented, Oct 29, 2019

Current status:

  • #106 (completed) tracks dropping BsonClassMap.AutoMap from MongoFramework
  • #87 tracks replacing the LINQ core of the MongoDB driver
  • #109 tracks replacing the serializer core of the MongoDB driver

In addition to these, there would still need to be tasks for:

  • Low-level command writing (translating insert/update/replace etc to write queries - replacing the internals of what BulkWrite etc do - this would include writing indexes etc)
  • Replace connection core (all the lowest level communication to MongoDB)
0reactions
ahmednfwelacommented, Nov 13, 2022

Out of curiousity, what were you needing to fall back to the driver for? Perhaps there is a way MongoFramework can cover it so you don’t need to?

I am migrating an old project from (MSSQL [EF core] + MongoDB) to MongoDB Only, and I was replacing EF core context with MongoFramework contexts, where I started facing this IQueryable conflict issue.

So I decided to build my own context class and use raw IMongoCollection instead.

I think that a simple solution to the conflicts would be to create a new Queryable type, e.g.: IMongoFrameworkQueryable<T> that extends IMongoQueryable<T> and build all the extensions on it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrade to the Latest Revision of MongoDB
Upgrade the instance using the operating system's package management tool and the official MongoDB packages. This is the preferred approach. · Upgrade the ......
Read more >
How to replace an element in a mongodb list using the C# ...
If I have a document of type Test, I can add elements to the list with push in the update: Update.Push(_ => _ ......
Read more >
mongo
Package mongo provides a MongoDB Driver API for Go. Basic usage of the driver starts with creating a Client from a connection string....
Read more >
MongoDB Node.js Driver
The recommended way to get started using the Node.js 5.x driver is by using the npm (Node Package Manager) to install the dependency...
Read more >
How to replace a document in MongoDB with Go driver?
Now on to replacing. The replacement must be a document itself, without using $set (this is not updating but replacing). For reference see...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found