i want to save diffenent tables in the same database using hibernate with Java. I am using one class and mainmethod for each table. however if i create one of these tables, all previous created other! table's entries are dropped. Is there a possibitlity to stop that behaviour?
Here the config:
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="connection.url">jdbc:postgresql://localhost:5432/Hibernatetest</property>
<property name="connection.username">postgres</property>
<property name="connection.password">password</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.internal.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<!-- Drop and re-create the database schema on startup -->
<property name="hbm2ddl.auto">create</property>
<mapping class="basePackage.Table1" />
<mapping class="basePackage.Table2" />
<mapping class="basePackage.Table3" />
<mapping class="basePackage.Table4" />
<mapping class="basePackage.Table5" />
</session-factory>