Open
Description
Since primitive null values are not emitted as query result (see #469), we should consider adding support for optional primitive projections such as OptionalInt
. These types allow reasoning about the target type and their value may be absent while still emitting a result object. This may be required when the result order matters.
interface MyRepository extends ReactiveCrudRepository<MyEntity, Integer> {
@Query("SELECT age FROM my_table ORDER BY first_name")
Flux<OptionalInt> findMaxAge();
}