Spring boot JPA no returning existing result using findById
问题 I have created a pretty small and simple Spring Boot app using the Oracle database and some JPA queries. This is the code snippet which is not returning data, which is actually exists in database. letterRecipientNonOas = letterRecipientNonOasRepository .findById(Long.valueOf(letterRecipientDTO.getNonOas().getId())) .orElseThrow(() -> new EntityNotFoundException(LetterRecipientNonOas.class, Constant.MESSAGE_ENTITY_NOT_FOUND)); here findById is returning empty result set. this is my repository