Adding hasKeyCriteria