- ABP Framework version: v4.1.0
- UI type: MVC
- DB provider: MongoDB
- Tiered (MVC) or Identity Server Seperated (Angular): yes
- Exception message and stack trace:
- Steps to reproduce the issue:
Hi,
When we are wanting to search for a user, we are generally replacing the default module repositories with appropriate methods overriden to allow the filter text search to be case insensitive. We are changing the filter to perform a regex (MongoDB) search with the ignore case flag set (new BsonRegularExpression(Regex.Escape(filterText), "i");
).
However, when we wanted to do this for the the MongoOrganizationUnitRepository
, the ...Unadded...
methods are not marked as virtual, so we are unable to override and change their behaviour. Our only option is to replace the whole repository and then make the changes. Could you make these methods virtual please?
Is it the intention that the filters in repositories are case sensitive? Is there a better way to change the search to be case insensitive without overriding each repository?
Mike
3 Answer(s)
-
0
There are also other repositories where the methods are not all marked as virtual, e.g. MongoIdentityRoleRepository
Maybe you could add a unit test to detect and ensure that all public methods of any repository are overridable?
-
0
Hello @michael.sudnik,
Good idea, we may have missed that. Thanks for the advice!