spring-data-relational
spring-data-relational copied to clipboard
JdbcAggregateOperations does not use columns parameter of Query
With Spring Data JDBC (Spring Boot 3.3.0), when using JdbcAggregateOperations.findAll API with a Query object, the columns parameter of the query is not respected. When I specify some columns in the query, the returned object should have only theses properties populated. The logged query shows that Spring Data JDBC is using all columns in the select part.
I have made a reproduction repo: https://github.com/Jul13nT/spring-data-jdbc-query-columns
You can run the CustomerRepositoryTest to see the problem.
This works fine with Spring Data R2DBC with R2dbcEntityTemplate.select.
I also encountered the same problem