Closed Ilanlido closed 1 year ago
I've checked against Mongo settings LinqProvider V2 and apparently .toString() are not supported in mongo in this version. i might change the ".toString()" we are doing to casting of string.. what do you think?
Hi @Ilanlido can you elaborate a little on your second comment?
Yes @tghamm Mongo currently supports two versions of Linq provider versions 2 and 3 which can be controlled by the client https://mongodb.github.io/mongo-csharp-driver/2.14/reference/driver/crud/linq3/ recently the default has changed to version 3. All queries that perform .ToString() are not supported in version 2, meaning that if the user uses linq v2 version a lot of queries won't work :( as for this PR everything works on version3. but i'm thinking maybe to add an additional PR or just in my Fork version a toggle to use casting to string instead of .ToString()
@Ilanlido thanks I see, looks like 2.19
was the first release to support LINQ3 as the proper provider. Hmm. Given that's the direction they are going, and it's latent support in other ORMs like EF, seems like the need for it is a bit temporary. That said, if you wanted to try adding a feature flag, and we can get it to pass all all the feature and integration tests, I'm not opposed to including it. Mongo isn't a case I have a grasp on how many users need, so as long as it doesn't conflict with base functionality or conflict with the other ORM support which is widely used, you're welcome to take a crack at it. Thoughts?
Alright, thanks. for now, this PR can be merged and released (if approved). I'll think about the options i have, i might just update my code to use the latest linq version
Thanks, ill merge it now and put out a release a little later today!
Instead of always checking if the key is inside the dictionary to allow "not" operators for example, dictionary.field not equal x when the field does not exist should return true (mongo supports this by default) in Memory filter rule should check with not_contains to avoid KeyNotFound exception