[jboss-user] [JBoss Seam] - Re: using import.sql with multiple datasources

pmengelt do-not-reply at jboss.com
Mon Aug 6 02:48:15 EDT 2007


Hi

when I set the property hibernate.hbm2ddl.auto to create in one datasource and not in the other - it works. My problem is that I have tables that should bei created each time and some are not! here it seems I need one datasource special for the tables that I want to create each time - or is there another possilbility?

regards Pascal

   <persistence-unit name="pms-msgbrowser">
  |       <provider>org.hibernate.ejb.HibernatePersistence</provider>
  |       <jta-data-source>java:/pms-msgbrowserDatasource</jta-data-source>
  |       <properties>
  |          <property name="hibernate.hbm2ddl.auto" value="create"/>
  |          <property name="hibernate.cache.use_query_cache" value="true"/>
  |          <property name="hibernate.show_sql" value="true"/>
  |          <property name="jboss.entity.manager.factory.jndi.name" value="java:/pms-msgbrowserEntityManagerFactory"/>
  |       </properties>
  |    </persistence-unit>
  | 
  |   <persistence-unit name="pms-msgbrowser-LUZ">
  |       <provider>org.hibernate.ejb.HibernatePersistence</provider>
  |       <jta-data-source>java:/pms-msgbrowser-LUZDatasource</jta-data-source>
  |       <properties>
  |          <property name="hibernate.hbm2ddl.auto" value="validate"/>
  |          <property name="hibernate.cache.use_query_cache" value="true"/>
  |          <property name="hibernate.show_sql" value="true"/>
  |          <property name="jboss.entity.manager.factory.jndi.name" value="java:/pms-msgbrowser-LUZEntityManagerFactory"/>
  | 
  |       </properties>
  |    </persistence-unit>

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

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



More information about the jboss-user mailing list