Build.xml target db-hibernate should fail if any errors occur during schema creation

Description

The build incorrectly succeeds even if hbm2ddl fails

Inline patch below:

  1.  

    1.  

      1. Eclipse Workspace Patch 1.0
        #P uPortal_3.0-patches
        Index: build.xml
        ===================================================================

      • build.xml (revision 1412)
        +++ build.xml (working copy)
        @@ -100,7 +100,7 @@
        configurationfile="${basedir}/uportal-impl/src/main/resources/properties/db/hibernate.cfg.xml"
        propertyfile="${basedir}/uportal-impl/src/main/resources/properties/rdbm.properties" />

  • <hbm2ddl export="true" drop="true" />
    + <hbm2ddl export="true" drop="true" haltonerror="true" />
    </hibernatetool>
    </uportal-impl-macro>
    </target>

Environment

None

Activity

Show:
Dustin Schultz
December 11, 2008, 4:36 PM

Unfortunately just adding haltonerror=true isn't going to work since some databases will error on statements that other databases might not. For instance, Oracle will error when dropping the hibernate_sequence that doesn't exist on an empty database.

Eric Dalquist
February 25, 2009, 8:58 PM

Setting priority to minor until we have a decent solution to resolve this.

Eric Dalquist
May 20, 2009, 2:35 AM

The more I look into this I don't think there is a 'good' solution due to how hibernate handles table creation.

Won't Fix

Assignee

Unassigned

Reporter

Dustin Schultz

Labels

None

Estimated End Date

None

Components

Affects versions

Priority

Minor