title: Hibernate criteria query multiple criteria
body: <p>In my current project I've faced a problem of getting entities with hibernate criteria query. I have the following entities:</p>
  
  <ul>
  <li>Professor, which contains a list of students</li>
  <li>Student, which contains a list of assignments.</li>
  <li>Assignment, which contains id of student to which it is assigned to.</li>
  </ul>
  
  <p>Now, I want to get all assignments relative to the professor, i.e. all assignments Professor assigned to his students.</p>
  
  <p>This query shows what I want to implement in criteria query.</p>
  
  <pre><code>select * from Assigment p, Student a, Professor c where p.studentid = a.id and a.proffid = c.id and c.id = 2411;
  </code></pre>
  
  <p>How can I implement this query using hibernate criteria API?</p>