I am fairly new to Spring Data and I want to create a query that will allow me to do an Inner Join between two entities.
I have been using this stack overflow to try to clarify certain aspects:
How To Define a JPA Repository Query with a Join
It gives the answer of structuring the query as so:
@Query("select u.userName from User u inner join u.area ar where ar.idArea = :idArea")
However in this query I dont see where it manages to define "ar" as neither of the entity classes actually define "ar" within themselves? Any clarification on this would be greatly appreciated!