0

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.

1 Answers1

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