spring-data-relational icon indicating copy to clipboard operation
spring-data-relational copied to clipboard

JdbcAggregateOperations does not use columns parameter of Query

Open Jul13nT opened this issue 1 year ago • 1 comments

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.

Jul13nT avatar Jun 03 '24 15:06 Jul13nT

I also encountered the same problem

stormlei avatar Jun 11 '24 08:06 stormlei