|
|
|
@ -57,7 +57,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; |
|
|
|
@ExtendWith(SpringExtension.class) |
|
|
|
@ExtendWith(SpringExtension.class) |
|
|
|
public class ConvertingR2dbcRepositoryIntegrationTests { |
|
|
|
public class ConvertingR2dbcRepositoryIntegrationTests { |
|
|
|
|
|
|
|
|
|
|
|
@Autowired private ConvertedRepository repository; |
|
|
|
private @Autowired ConvertedRepository repository; |
|
|
|
private JdbcTemplate jdbc; |
|
|
|
private JdbcTemplate jdbc; |
|
|
|
|
|
|
|
|
|
|
|
@Configuration |
|
|
|
@Configuration |
|
|
|
@ -77,7 +77,7 @@ public class ConvertingR2dbcRepositoryIntegrationTests { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@BeforeEach |
|
|
|
@BeforeEach |
|
|
|
public void before() { |
|
|
|
void before() { |
|
|
|
|
|
|
|
|
|
|
|
this.jdbc = new JdbcTemplate(createDataSource()); |
|
|
|
this.jdbc = new JdbcTemplate(createDataSource()); |
|
|
|
|
|
|
|
|
|
|
|
@ -124,8 +124,9 @@ public class ConvertingR2dbcRepositoryIntegrationTests { |
|
|
|
}).verifyComplete(); |
|
|
|
}).verifyComplete(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test // GH-1723
|
|
|
|
void shouldNotUseConverterForCountQueries() { |
|
|
|
void shouldNotUseConverterForCountQueries() { |
|
|
|
|
|
|
|
|
|
|
|
ConvertedEntity entity = new ConvertedEntity(); |
|
|
|
ConvertedEntity entity = new ConvertedEntity(); |
|
|
|
entity.name = "name"; |
|
|
|
entity.name = "name"; |
|
|
|
|
|
|
|
|
|
|
|
@ -142,6 +143,7 @@ public class ConvertingR2dbcRepositoryIntegrationTests { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
interface ConvertedRepository extends ReactiveCrudRepository<ConvertedEntity, Integer> { |
|
|
|
interface ConvertedRepository extends ReactiveCrudRepository<ConvertedEntity, Integer> { |
|
|
|
|
|
|
|
|
|
|
|
@Query("SELECT COUNT(*) FROM CONVERTED_ENTITY") |
|
|
|
@Query("SELECT COUNT(*) FROM CONVERTED_ENTITY") |
|
|
|
Mono<Long> countWithCustomQuery(); |
|
|
|
Mono<Long> countWithCustomQuery(); |
|
|
|
} |
|
|
|
} |
|
|
|
|