Skip to content

Commit e4b7bd5

Browse files
committed
Update R2dbcEntityTemplate.selectOne() mentioning IncorrectResultSizeDataAccessException.
Closes #566
1 parent 17d5589 commit e4b7bd5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/springframework/data/r2dbc/core/R2dbcEntityOperations.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,12 @@ public interface R2dbcEntityOperations extends FluentR2dbcOperations {
8989
<T> Flux<T> select(Query query, Class<T> entityClass) throws DataAccessException;
9090

9191
/**
92-
* Execute a {@code SELECT} query and convert the resulting item to an entity.
92+
* Execute a {@code SELECT} query and convert the resulting item to an entity ensuring exactly one result.
9393
*
9494
* @param query must not be {@literal null}.
9595
* @param entityClass The entity type must not be {@literal null}.
96-
* @return the result object returned by the action or {@link Mono#empty()}.
96+
* @return exactly one result or {@link Mono#empty()} if no match found.
97+
* @throws org.springframework.dao.IncorrectResultSizeDataAccessException if more than one match found.
9798
* @throws DataAccessException if there is any problem issuing the execution.
9899
*/
99100
<T> Mono<T> selectOne(Query query, Class<T> entityClass) throws DataAccessException;

0 commit comments

Comments
 (0)