title: How to avoid Spring Data Jpa doing join on simple select?
body: <p>I have entity with @ManyToOne linking, when I use criteria to execute query, spring use cross join, but I just want to select on own column.</p>
  
  <p>the case:</p>
  
  <pre><code>public class Job {
  
     @Column
     private Long jobId;
  
     @OneToMany(fetch = FetchType.EAGER)
     @JoinColumn(name="creator", referencedColumnName="uid")
     private User creator;
  
  }
  
  public class User {
  
  
     @Column
     private Long uid;
  
     @Column
     private String name;
  
  }
  
  public Predicate toPredicate(Root&lt;Job&gt; root, CriteriaQuery&lt;?&gt; query, CriteriaBuilder cb) {
      List&lt;Predicate&gt; Predicates=new ArrayList&lt;Predicate&gt;();
  
     Predicates.add(cb.equal(root.get("creator").get("uid"), 123456));
     query.where(Predicates.toArray(new Predicate[Predicates.size()]));
     return null;
  }
  </code></pre>
  
  <p>I just want to create query like "select ... from job where user_id = 123456",
  but spring execute like "select ... from job m cross join user u where m.creator = u.uid and u.uid = 123456".</p>
  
  <p>How to avoid join use Criteria in ManyToOne link, just select on own column. </p>