title: Hibernate, generate entities and database from mapping file
body: <p>I was wondering if it was possible to generate entities from hibernate mapping file.
  My ultimate goal is to programmaticaly create a mapping file, and then create the database from it.
  I know that I can use :</p>
  
  <pre><code>&lt;prop key="hibernate.hbm2ddl.auto"&gt;create&lt;/prop&gt;
  </code></pre>
  
  <p>To create database form entities, but is there a way, (without eclipse tool, I need to do it automatically in the application) to generate entities from mapping? (Or even directly database from mapping).</p>
  
  <p>I don't know if other tools can do it, but I though I would use Hibernate because of the cross database compatibility.</p>
  
  <p>Thank you!
  Guillaume</p>