[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: MySqlDS: lost all tables (and data)!

jaikiran do-not-reply at jboss.com
Sat Jul 19 01:56:58 EDT 2008


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

When you have set this property to "update", the tables should not have been dropped. Try this, start JBoss with your application, see if the tables are created. Then stop JBoss, see if the tables are dropped. That will tell us when the drop statements are being executed.

Also, add the hibernate.show_sql property to your persistence-unit as follows:

  | <properties>
  |       <property name="hibernate.hbm2ddl.auto" value="update"/>         
  |       <property name="hibernate.show_sql" value="true"/>         
  |       
  |     </properties>

This will print out, in server.log, the SQLs being fired. Keep an watch on the server.log file to see when the drop statements are fired.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4165465#4165465

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4165465



More information about the jboss-user mailing list