I am using spring data JPA I am trying to update the entity using the JPARepository method save() to update the entity details. Code I have written to update the entity works fine in development as expected. But the same code does not work on the production server it does not give any error only the code written inside the map() does not work. Below is my code
public Long updateQrCodeUrlByBusinessDetails(Long businessId, String menuUrl, MENU_TYPE menuType) {
return qrCodeRepo.findByBusinessId(businessId).businessQrCode.stream().map(qr -> {
qr.setMenuUrl(menuUrl);
qr.setMenuType(menuType);
return qrCodeRepo.save(qr);
}).count();
}