Skip to content

Commit ed63cef

Browse files
committed
#407 - Polishing.
Guard find(Sort) against null values. Add author to documentation. Use ReactiveDataAccessStrategy in R2dbcEntityTemplate created in SimpleR2dbcRepository. Original pull request: #408.
1 parent 4da92bd commit ed63cef

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/main/asciidoc/index.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
= Spring Data R2DBC - Reference Documentation
2-
Mark Paluch, Jay Bryant
2+
Mark Paluch, Jay Bryant, Stephen Cohen
33
:revnumber: {version}
44
:revdate: {localdate}
55
ifdef::backend-epub3[:front-cover-image: image:epub-cover.png[Front Cover,1050,1600]]

src/main/java/org/springframework/data/r2dbc/repository/support/SimpleR2dbcRepository.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public SimpleR2dbcRepository(RelationalEntityInformation<T, ID> entity, Database
8181
R2dbcConverter converter, ReactiveDataAccessStrategy accessStrategy) {
8282

8383
this.entity = entity;
84-
this.entityOperations = new R2dbcEntityTemplate(databaseClient);
84+
this.entityOperations = new R2dbcEntityTemplate(databaseClient, accessStrategy);
8585
this.idProperty = Lazy.of(() -> converter //
8686
.getMappingContext() //
8787
.getRequiredPersistentEntity(this.entity.getJavaType()) //
@@ -179,6 +179,9 @@ public Flux<T> findAll() {
179179
*/
180180
@Override
181181
public Flux<T> findAll(Sort sort) {
182+
183+
Assert.notNull(sort, "Sort must not be null!");
184+
182185
return this.entityOperations.select(Query.empty().sort(sort), this.entity.getJavaType());
183186
}
184187

0 commit comments

Comments
 (0)