[jboss-user] [JBoss Seam] - Re: when and how does the seam create tables in the databas
texan
do-not-reply at jboss.com
Wed Aug 30 14:00:36 EDT 2006
I believe it is the following property (in bold) in the peristence.xml file (from the booking example):
<persistence>
| <persistence-unit name="bookingDatabase">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/bookingDatasource</jta-data-source>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
| <property name="hibernate.show_sql" value="true"/>
| <!-- These are the default for JBoss EJB3, but not for HEM: -->
| <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
| <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
| </properties>
| </persistence-unit>
| </persistence>
This actually bit me on butt when I first incorporated the seam setup into my existing project, as it dropped my tables and recreated them. Ouch - so mych for my test data! I learned that lesson pretty quickly.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968454#3968454
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968454
More information about the jboss-user
mailing list