Open
Description
When writing ReactiveMongoRepository/ReactiveCrudRepository with spring-boot-starter-data-mongodb-reactive and declaring suspend find function with non-nullable kotlin return types, the repository returns null when it can't find an entity instead of EmptyResultDataAccessException.
Here is the fun declaration:
suspend fun findSomeEntitiesById(id: Long): SomeEntity
And this test prints null when called with id that does not exists:
@Test internal fun returnsNllReference() { runBlocking { println(repositoryMy.findSomeEntitiesById(123)) } }
If I replace spring-boot-starter-data-mongodb-reactive with spring-boot-starter-data-r2dbc, it throws
org.springframework.dao.EmptyResultDataAccessException: Result must not be null!