Spring data jpa count by query

Viewed 16675

I have users containing set of courses and U need to just get the count of courses a student is enrolled into. I do not want ti load the student since this will load the entire student graph object with othe attributed like address etc etc. Is there a way using spring data jpa to get just the count.

2 Answers
Related