-
Nov 29th, 2007, 04:33 PM
#1
When hbm2ddl= create, I want DDL written to a file
Hi Guys,
In development, I succesfully have hibernate configured to create tables automatically by configuring Hibernate in Spring as shown below, basically setting <prop key="hibernate.hbm2ddl.auto">create</prop>
But for creating schema in live database , I want save the DDL to a file rather than run it automatically, editing some of the DDL. Is this possible when Hibernate is configured in Spring (I know there is a maven plugin, but it depends on Hibernate being configured without benefit of Spring)
Thanks in advance, Eliot
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotati on.AnnotationSessionFactoryBean">
... <property name="configurationClass">
<value>org.hibernate.cfg.AnnotationConfiguration </value>
</property>
<property name="annotatedClasses">
<list>
... </list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.hbm2ddl.auto">create</prop>
</props>
</property>
</bean>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules