Matching query now works for ORM, ODM and Memory gateway