title: How to see SQL query using Hibernate Tools in Eclipse?
body: <p>Having installed Hibernate Tools in Eclipse, how can I view the would-be generated SQL query of from the JPA query language? (I'm using Hibernate as my JPA implementation)</p>
  
  <p>My Java DAO class looks something like:</p>
  
  <pre><code>public List&lt;Person&gt; findById(int id)
  {
      return entityManager.find(Person.class, id);
  }
  public List&lt;Person&gt; find(String name)
  {
      Query q = entityManager.createQuery("SELECT p FROM Person p WHERE name=?");
      q.setParameter(1, name);
      return q.getResultList();
  }
  </code></pre>
  
  <p>I want to see what the corresponding SQL query will be. I've heard that Hibernate Tools has some kind of support for this.</p>