Search with JOIN

Complex conditions involving joins can be specified as the search criteria. With the single object type searches (documents(), folders() or repositoryObjects()) the properties selected are still from a single class but the search criteria can involve multiple joined classes.
The following example involves a document class (LoanApplication) and a class representing a lender:
{
  documents(
    repositoryIdentifier:"OS1"
    from:" LoanApplication a INNER JOIN Lender e ON a.Lender = e.This"
    where:" e.LenderName LIKE 'Local%'"
    orderBy:" a.SubmittedDate DESC"
    pageSize:20
  ) {
    documents {
      id
      name
      properties(includes: ["Lender", "LoanType", "LoanAmount", "SubmittedDate"]) {
        id
        label
        type
        cardinality
        value
        ... on ObjectProperty {
          objectValue {
            className
            ... on CmAbstractPersistable {
              creator
              dateCreated
              properties(includes: ["LenderName"]) {
                id
                label
                type
                cardinality
                value
              }
            }
          }
        }
      }
    }
    pageInfo {
      token
    }
  }
}