Enhance the criteria for queries and repositories