I'm facing the same problem, but unable to solve it. Using spring boot 3.4.5, r2dbc-postgresql 1.0.7. My query looks like:
select test.id,
test.name,
test.description,
test.active,
count(q.id) as questions_count
from test_entity test
left join test_question q on q.test_entity_id = test.id
group by test.id, test.name, test.description, test.active
I tried many variants of spelling questions_count, but always get null.
I even tried to wrap this query into
select mm.* (
...
) mm
But that doesn't help.
I'm using R2dbcRepository with @Query annotation, and interface for retrieving result set.