title: FindBy using a foreign key in JPA
body: <p>I have the 3 following Entities in my project.</p>
  
  <pre><code>@Entity
  public class Review {
      @Id
      @GeneratedValue
      private int reviewId;
  
      @OneToMany(mappedBy="review", cascade = CascadeType.ALL)
      private List&lt;Comment&gt; comments;
  
      @ManyToOne
      private User user;
  }
  
  @Entity
  public class Comment {
      @Id
      @GeneratedValue
      private int commentId;
  
      @ManyToOne
      private Review review;
  
      @ManyToOne
      private User user;
  }
  
  @Entity
  public class User {
      @Id @GeneratedValue
      private Long userId;
  
      @OneToMany(mappedBy="user", cascade = CascadeType.ALL)
      private List&lt;Comment&gt; comments;
  
      @OneToMany(mappedBy="user", cascade = CascadeType.ALL)
      private List&lt;Review&gt; reviews;
  }       
  </code></pre>
  
  <p>I want to use JPA to fetch every <code>Comment</code> on a particular <code>Review</code>, such that under the page of each <code>Review</code>, I can display the name of the <code>User</code> who commented, along with the actual <code>Comment</code>. So when I visit the page <code>http://localhost:8080/review/view/5</code>, I want to be able to see the review in addition to all comments made on it, along with the names of the users who added the comments.</p>
  
  <p>Is this achievable without writing the SQL myself? If yes, how?</p>