You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created this query in repository with appropriate java class for projection. When query is executed, i am getting null in walmartYearWeek.
@Query(""" SELECT DISTINCT ON (com_yr_wk) com_yr_wk as walmart_year_week, com_start_date as walmart_week_start_date FROM calendar_meta WHERE calendar_date BETWEEN :startDate AND :endDate ORDER BY com_yr_wk """)
Flux<WalmartCalendarWeek> findWalmartYearWeekDistinctByDateBetween(LocalDatestartDate, LocalDateendDate);
Then, i tried following query and class and now the value is coming as expected in walmarYearWeek.
@Query(""" SELECT DISTINCT ON (com_yr_wk) com_yr_wk as walmar_year_week, com_start_date as walmart_week_start_date FROM calendar_meta WHERE calendar_date BETWEEN :startDate AND :endDate ORDER BY com_yr_wk """)
Flux<WalmarCalendarWeek> findWalmarYearWeekDistinctByDateBetween(LocalDatestartDate, LocalDateendDate);
Hi Team,
I have created this query in repository with appropriate java class for projection. When query is executed, i am getting
null
inwalmartYearWeek
.Then, i tried following query and class and now the value is coming as expected in
walmarYearWeek
.To conclude,
walmart_year_week
alias is not working butwalmar_year_week
or any other alias worksNOTE: Above issue is not there with
org.springframework.boot:spring-boot-starter-parent:3.2.0
.I have created sample repo to reproduce this behaviour
https://github.com/jaykakkad69/r2dbc-demo
data.sql
file to create database and populate test dataPostgresConfiguration
Thanks.
The text was updated successfully, but these errors were encountered: