Filtering case insensitive Mongo db
Hello,
I have a question about filtering. I notice that the filtering in mongo is case sensitive, but there is a property in schema "caseExact" that I think you have to manage, right?
Maybe in SQL it works because by default Sql search has case insensitive search.
Am I right?
Thanks. Gabriele
Hello,
Indeed there is an issue in the project "SimpleIdServer.Scim.Persistence.MongoDB" , the "caseExact" property must be used. I'm going to work on it.
The issue should be fixed in the branch "origin/release/1.2.0". Can-you try again with the latest changes ?
It works, many thanks :-)
Hello, it seems that is not working using "eq" filter anymore.
/Users?filter=name.familyName eq "name" it doesn't work, it returns empty data /Users?filter=name.familyName sw "name" it works properly
Regards. Gabriele
Hi,
Indeed there is an issue with the "equality" filtering when the property "CaseExact" is set to "False". When this property is "false" then the LINQ expression is not properly parsed by the library "MongoDB.Driver". I opened an issue in the project to fix this issue : https://github.com/mongodb/mongo-csharp-driver/pull/440 KR
@simpleidserver since the release 1.2.0 has been delivered, I think that is better to revert the changes regarding the CaseExact.
What do you think?
Hello,
The changes have been rolled back in the branch "release/1.2.1".
A bug has been reported in the MongoDB project, the advancement can be followed here : https://jira.mongodb.org/browse/CSHARP-3425?jql=project%20%3D%20CSHARP%20AND%20resolution%20%3D%20Unresolved%20AND%20text%20~%20%22ToLower%22%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC. The CaseExact parameter will be supported by SimpleIdServer when Invariant comparison will be supported by the mongo-csharp-driver library.