5 Replies Latest reply on Feb 24, 2006 10:07 AM by gus888

    JBoss4.0.4RC1: tables were dropped

    gus888

      Hi all,

      It was very painful when I tried to migrate to JBoss4.0.4RC1 from EJB3.0RC3. Finally, it worked, but I found that all my data in database were deleted and tables were recreated. My persistence.xml was:

      <persistence>
       <persistence-unit name="dvd">
       <jta-data-source>java:/DVD_DS</jta-data-source>
       <properties>
      
       <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
      
       <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
      
       <property name="hibernate.cache.provider_class"
       value="org.jboss.ejb3.entity.TreeCacheProviderHook"/>
       <property name="hibernate.treecache.mbean.object_name"
       value="jboss.cache:service=EJB3EntityTreeCache"/>
      
       </properties>
       </persistence-unit>
      </persistence>
      


      Later, I changed the line
      <property name="hibernate.hbm2ddl.auto" value="create-drop"/>

      to
      <property name="hibernate.hbm2ddl.auto" value="none"/>

      and recreated new tables, but I found parts of my tables were dropped, and some of them remained. I do not know what is wrong with persistence.xml. Any help would be appreciated. Thanks in advance.

      GUS