[FIX] Fix search with type specified in the class

When type was set in the custom repository class, it was not respected, when searching, only when finding.

Please can you advice me how to add test for this?