1

我正在将 ReactiveCrudRepository 与 Spring Web Flux 一起使用。以下查询未使用 r2dbc 更新 Postgres 数据库中的数据。我最初也尝试不使用@Modifying。我参考了这个链接使用了这个注释

@Modifying(flushAutomatically = true, clearAutomatically = true)
@Query("update company set deleted_at=current_timestamp, deleted_by=:deletedByUserId where id=:id")
Mono<Void> deleteById(Long id, Long deletedByUserId);
4

0 回答 0