From e6b46fd78159f97669692fb45780ebb77ece6df0 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 18 Mar 2021 09:54:44 +0100 Subject: [PATCH] Update R2dbcEntityTemplate.selectOne() mentioning IncorrectResultSizeDataAccessException. Closes #566 --- .../data/r2dbc/core/R2dbcEntityOperations.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/springframework/data/r2dbc/core/R2dbcEntityOperations.java b/src/main/java/org/springframework/data/r2dbc/core/R2dbcEntityOperations.java index 13fbfe4c..37f9461b 100644 --- a/src/main/java/org/springframework/data/r2dbc/core/R2dbcEntityOperations.java +++ b/src/main/java/org/springframework/data/r2dbc/core/R2dbcEntityOperations.java @@ -102,11 +102,12 @@ public interface R2dbcEntityOperations extends FluentR2dbcOperations { Flux select(Query query, Class entityClass) throws DataAccessException; /** - * Execute a {@code SELECT} query and convert the resulting item to an entity. + * Execute a {@code SELECT} query and convert the resulting item to an entity ensuring exactly one result. * * @param query must not be {@literal null}. * @param entityClass The entity type must not be {@literal null}. - * @return the result object returned by the action or {@link Mono#empty()}. + * @return exactly one result or {@link Mono#empty()} if no match found. + * @throws org.springframework.dao.IncorrectResultSizeDataAccessException if more than one match found. * @throws DataAccessException if there is any problem issuing the execution. */ Mono selectOne(Query query, Class entityClass) throws DataAccessException;