title: How to have Hibernate create tables on startup?
body: <p>I am using Hibernate with HSQLDB and I have noticed that when the application starts up, no tables get created in HSQLDB.  It's not until the first select or the first insert that all the tables get created in HSQLDB.  Is there any way to have all the tables get created when the application starts up?</p>
  
  <p>EDIT in reply to Pangea:</p>
  
  <p>I modified our hibernate cfg xml file so that it includes the following:</p>
  
  <pre><code>&lt;property name="hbm2ddl.auto"&gt;create&lt;/property&gt;
  &lt;prop key="hibernate.hbm2ddl.auto"&gt;create&lt;/property&gt;
  </code></pre>
  
  <p>But the tables still do not get created when the server starts up.  They only get created after the first insert or select.  You mentioned that the tables will be created during the creation of the Hibernate session factory.  Our code does not call the Configuration.buildSessionFactory() until an insert or a select is performed.  Is there any way to create the tables prior to that?</p>