TurnerSoftware / MongoFramework

An "Entity Framework"-like interface for MongoDB
MIT License
392 stars 35 forks source link

Exception User Unhandled once left join is exectuted #371

Open locampoArkus opened 1 year ago

locampoArkus commented 1 year ago

Exception User Unhandled System.Reflection.TargetInvocationException: 'Exception has been thrown by the target of an invocation.' NotSupportedException: $project or $group does not support {document}.

Same query was runned using MongoDB Driver tool and works perfectly, but using mongoframework thrown this exception. image

Turnerj commented 1 year ago

I'm going to guess it is likely due to this line: https://github.com/TurnerSoftware/MongoFramework/blob/840ebf026c50585072efbddf9a058c884415a49a/src/MongoFramework/MongoDbConnection.cs#L29

Basically within the MongoDB Driver, they have multiple implementations of the LINQ-backed system. V3 is the default as of 2.14 or something and improves various types of queries. Unfortunately V3 also breaks a bunch of internal hooks that MongoFramework uses and I haven't yet had the time to fix all the issues.

I thought I had a draft PR up of my progress for it but I guess I never pushed it - will have to dig that up at some point.