Skip to content

Commit

Permalink
fix transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
des-felins committed Aug 12, 2024
1 parent 6f6d388 commit 8f7dbf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/example/r2dbc/service/CustomerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ private Mono<CustomerDTO> getOrdersForCustomer(Customer customer) {

return Mono.just(customer)
.zipWith(orderRepository.findAllByCustomerId(customer.getId()).collectList())
.as(transactionalOperator::transactional)
.map(result -> new CustomerDTO(
result.getT1().getId(),
result.getT1().getName(),
result.getT1().getEmail(),
result.getT2()))
.as(transactionalOperator::transactional);
result.getT2()));

}

Expand Down

0 comments on commit 8f7dbf3

Please sign in to comment.