hey guys. can smb help me out? i have this service:
public void createPaymentpaymentReversal(PaymentDTO paymentReversalRequest) throws NoEarlierPaymentException {
Optional<Payment> earlierPayment=paymentRepository.findByTransactionId(paymentReversalRequest.getTransactionId());
//some skipped stuff
Payment payment=PaymentMapper.toEntity(paymentReversalRequest);
paymentRepository.deleteByTransactionId(payment.getTransactionId());
}
in the payment repo i have this method:
@Query(value = "delete from my_table where transaction_id= :transactionId", nativeQuery = true)
void deleteByTransactionId(@Param("transactionId") String transactionId);
the records are deleted from the table, but for some reason i get:
2024-07-23 16:39:52.127 ERROR 28956 --- [nio-8080-exec-1] o.h.engine.jdbc.spi.SqlExceptionHelper : No results were returned by the query.
2024-07-23 16:39:52.139 ERROR 28956 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: could not extract ResultSet; nested exception is org.hibernate.exception.GenericJDBCException: could not extract ResultSet] with root cause
org.postgresql.util.PSQLException: No results were returned by the query.
can smb help me out? thx