diff --git a/health-services/individual/src/main/java/org/egov/individual/repository/IndividualRepository.java b/health-services/individual/src/main/java/org/egov/individual/repository/IndividualRepository.java index cb9360cad80..3d9b4bb19c8 100644 --- a/health-services/individual/src/main/java/org/egov/individual/repository/IndividualRepository.java +++ b/health-services/individual/src/main/java/org/egov/individual/repository/IndividualRepository.java @@ -267,13 +267,15 @@ private String getQueryForIndividual(IndividualSearch searchObject, Integer limi } if (searchObject.getUsername() != null) { - query = query + "AND username=:username "; + query = query + "AND username in (:username) "; paramsMap.put("username", searchObject.getUsername()); } if (searchObject.getUserId() != null) { - query = query + "AND userId=:userId "; - paramsMap.put("userId", String.valueOf(searchObject.getUserId())); + query = query + "AND userId in (:userId) "; + paramsMap.put("userId", searchObject.getUserId().stream() + .map(Object::toString) + .collect(Collectors.toList())); } if (searchObject.getUserUuid() != null) {