I'm using spring boot 1.5, I want to get alerts grouped by their status (four status).thereby I'm using a native query in the repository. when I run that query it's giving me the result. but it doesnt work with the service. the result I've got when I run with the console : https://drive.google.com/open?id=1eson3nEHAIEr-jdEgkC1-tw2acRsW728
the service is :
@Override
public List<DashboardAlertVO> countingStatus() {
return alertRepository.countStatus()
.stream()
.map(o -> new DashboardAlertVO(AlertStatus.fromValue((String) o[0]),
((Integer) o[1])))
.collect(Collectors.toList());
}
so I'm getting this error :
"message": "java.math.BigInteger cannot be cast to java.lang.Integer",
I don't know what's matter really with this code. Please help ! Thank you a lot.