title: JPQL VS Criteria Api
body: <p>Well, first: I found this question:</p>
  
  <p><a href="https://stackoverflow.com/questions/3858406/what-to-use-jpql-or-criteria-api">What to use: JPQL or Criteria API?</a></p>
  
  <p>and from other searches I suppose that the only benefit of criteria api is that can check the query and, if it isn't correct, returns a compiler error.
  Is it right?
  If no, which are the advantage and disavantage from using JPQL or Criteria Api?</p>
  
  <p>P.S.: The question is born after this other question:</p>
  
  <p><a href="https://stackoverflow.com/questions/8342955/error-in-criteriaquery">https://stackoverflow.com/questions/8342955/error-in-criteriaquery</a>
  and the difficult that I'm finding to resolve that problem when I do the correct method using JPQL in 20 minutes...</p>