I am Using JPARespository to perform Database operations. I have a requirement, where I want to select specific columns from given table while passing a few where clause.
Asked
Active
Viewed 5,010 times
1 Answers
0
You can use projections. Spring Data will select only required columns. It works with both generated queries from method name and @Query
annotation.
Related question: Spring Data JPA Projection selected fields from the DB

Jakub Dyszkiewicz
- 524
- 1
- 5
- 17