[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: could not insert exception in JBOSS 4.2.2 GA ...
do-not-reply at jboss.com
Wed Mar 19 15:46:14 EDT 2008
thanks to u , i got it right this time ...
and thought of describing the method i followed for the help of any other , who might need this in the future..
what i did was i add the following property to persistence.xml
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
also , as u said ,
<property name="hibernate.hbm2ddl.auto" value="update"/>
so this works fine.Even i restart the JBOSS server , the table is persistent in the database..
But , if i used
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
instead. ( which i tested by using it earlier ) and , when the JBOSS restarted the table will be created from the beginning , when the JBOSS is shutdown , the table is vanished.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137893#4137893
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4137893
More information about the jboss-user