Announcement Announcement Module
No announcement yet.
When hbm2ddl= create, I want DDL written to a file Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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="">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 name="annotatedClasses">
    ... </list>
    <property name="hibernateProperties">
    <prop key="">create</prop>