title: Why does JPA join return too many results?
body: <p>If I query in SQL:</p>
  
  <pre><code>select * from Profesor
  inner join Estudiantes on Profesor.id = Estudiante.id
  where Profesor.nombre = 'juan'
    and Estudiante.nombre = 'jose'
  </code></pre>
  
  <p>This query return the profesor and the student. One profesor and one student. Just Profesor Juan with Jose as Student.</p>
  
  <p>Then if I Query in JPA:</p>
  
  <pre><code>select p from Profesor p
  inner join p.estudiantes e
  where p.nombre = juan
    and e.nombre = jose.
  </code></pre>
  
  <p>JPA will return profesor Juan with <em>all</em> the students not just the one I wanted and <code>profesor.estudiantes</code> will have the list with <em>all</em> the students.</p>
  
  <p>My types are:</p>
  
  <pre><code>class Profesor{
      private List&lt;Estudiante&gt; estudiantes;
  }
  
  class Estudiante{
      String matricula;
  }
  </code></pre>
  
  <p>Sorry I code in spanish. I just figure out this.</p>
  
  <p>I dont know if I were clear on my question, please tell me.</p>