title: Hibernate Criteria API multiple joins
body: <p>My hibernate entities are as follows: </p>
  
  <pre><code>@Entity
  @Table(name = "EditLocks")
  public class EditLock extends AuditableEntity {
  
      /** The document that is checked out. */
      @OneToOne
      @JoinColumn(name = "documentId", nullable = false)
      private Document document;
  </code></pre>
  
  <p>Document then looks like this: </p>
  
  <pre><code>public class Document extends AuditableEntity {
      /** Type of the document. */
      @ManyToOne
      @JoinColumn(name = "documentTypeId", nullable = false)
      private DocumentType documentType;
  </code></pre>
  
  <p>Essentially the query I want to write is: </p>
  
  <pre><code>Select * from EditLocks el, Document docs, DocumentTypes dt where el.documentId = docs.id and docs.documentTypeId = dt.id and dt.id = 'xysz';
  </code></pre>
  
  <p>How do I do this with the hibernate criteria api?</p>