We can select specific columns by writing custom @Query methods in our Repository Interface. However, I don\'t want to write so many methods for different properties.
I tried this, but it returns the entire object all the time.
This method returns single entity matching given specification. Please check here
According to my understanding this is the correct way. U can access the properties of the entity as normal (Eg. MyInfo.getIdProperty())