We now map results of exists queries to a boolean flag to ensure proper decoding. Previously, results were attempted to be mapped onto a primitive type which failed as there's no converter registered for Row to Boolean.
@ -82,6 +82,24 @@ public class PartTreeR2dbcQuery extends AbstractR2dbcQuery {
@@ -82,6 +82,24 @@ public class PartTreeR2dbcQuery extends AbstractR2dbcQuery {
@ -112,6 +112,24 @@ public class StringBasedR2dbcQuery extends AbstractR2dbcQuery {
@@ -112,6 +112,24 @@ public class StringBasedR2dbcQuery extends AbstractR2dbcQuery {
@ -133,6 +151,7 @@ public class StringBasedR2dbcQuery extends AbstractR2dbcQuery {
@@ -133,6 +151,7 @@ public class StringBasedR2dbcQuery extends AbstractR2dbcQuery {
@ -296,6 +296,33 @@ public abstract class AbstractR2dbcRepositoryIntegrationTests extends R2dbcInteg
@@ -296,6 +296,33 @@ public abstract class AbstractR2dbcRepositoryIntegrationTests extends R2dbcInteg
.verifyComplete();
}
@Test// gh-363
voidderivedQueryWithCount(){
shouldInsertNewItems();
repository.countByNameContains("SCH")//
.as(StepVerifier::create)//
.assertNext(i->assertThat(i).isEqualTo(2))//
.verifyComplete();
}
@Test// gh-468
voidderivedQueryWithExists(){
shouldInsertNewItems();
repository.existsByName("ABS")//
.as(StepVerifier::create)//
.expectNext(Boolean.FALSE)//
.verifyComplete();
repository.existsByName("SCHAUFELRADBAGGER")//
.as(StepVerifier::create)//
.expectNext(true)//
.verifyComplete();
}
@Test// gh-421
voidshouldDeleteAllAndReturnCount(){
@ -345,6 +372,8 @@ public abstract class AbstractR2dbcRepositoryIntegrationTests extends R2dbcInteg
@@ -345,6 +372,8 @@ public abstract class AbstractR2dbcRepositoryIntegrationTests extends R2dbcInteg