title: How to make Hibernate not drop tables
body: <p>I am using hibernate and whenever I try to add a record it drops the table and adds it again. It never uses the existing table and make changes on that.</p>
  
  <p>This is the relevant part of my <code>hibernate.cfg.xml</code>:</p>
  
  <pre><code>&lt;hibernate-configuration&gt;
  &lt;session-factory&gt;
    &lt;property name="hibernate.connection.driver_class"&gt;org.apache.derby.jdbc.ClientDriver&lt;/property&gt;
    &lt;property name="hibernate.connection.url"&gt;jdbc:derby://localhost:1527/sample&lt;/property&gt;
    &lt;property name="hibernate.connection.username"&gt;user&lt;/property&gt;
    &lt;property name="hibernate.connection.password"&gt;password&lt;/property&gt;
    &lt;property name="hibernate.connection.pool_size"&gt;10&lt;/property&gt;
    &lt;property name="show_sql"&gt;true&lt;/property&gt;
    &lt;property name="dialect"&gt;org.hibernate.dialect.DerbyDialect&lt;/property&gt;
    &lt;property name="hibernate.hbm2ddl.auto"&gt;update&lt;/property&gt;
    &lt;property name = "current_session_context_class"&gt;thread&lt;/property&gt;
    &lt;!-- Mapping the entities --&gt;
  &lt;mapping class="inputDetails.Table1"/&gt;
  &lt;mapping class="inputDetails.Table2"/&gt;
  
  
    &lt;!--mapping resource="contact.hbm.xml"/--&gt;
  &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>This is how I save data:</p>
  
  <pre><code>SessionFactory factory = new Configuration().configure().buildSessionFactory();
      Session session = factory.getCurrentSession();
      session.beginTransaction();
  //...
  session.save(newrecord)
  session.getTransaction().commit();
  </code></pre>