|
Hy guys,
I'm using Hibernate 3 + TOMCAT 5.5 and when I start my aplication, the Hibernate erase my registers in the table. In annex it follows the hibernate.cfg.xml.
Thank's.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.microsoft.jdbc.sqlserver.SQLServerDriver</property>
<property name="hibernate.connection.password">paulo123</property>
<property name="hibernate.connection.url">jdbc:microsoft:sqlserver://10.173.100.23;DatabaseName=HIBERNATE;SelectMethod=cursor</property>
<property name="hibernate.connection.username">paulonep</property>
<property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
<!-- Use the C3P0 connection pool. -->
<property name="c3p0.min_size">3</property>
<property name="c3p0.max_size">5</property>
<property name="c3p0.timeout">1800</property>
<!-- Disable second-level cache. -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<property name="cache.use_query_cache">false</property>
<property name="cache.use_minimal_puts">false</property>
<property name="max_fetch_depth">3</property>
<!-- Print SQL to stdout. -->
<property name="show_sql">true</property>
<property name="format_sql">true</property>
<!-- Drop and then re-create schema on SessionFactory build, for testing. -->
<property name="hbm2ddl.auto">create</property>
<!-- Bind the getCurrentSession() method to the thread. -->
<property name="current_session_context_class">thread</property>
<!-- Hibernate XML mapping files -->
<mapping resource="br/com/shc/database/pessoa/Pessoa.hbm.xml"/>
</session-factory>
</hibernate-configuration>
_________________ Paulo Nepomuceno
Java Developer
|