[hibernate-issues] [Hibernate-JIRA] Created: (HBX-1159) hbm2ddl outputfiles should be comparables

Maillefer Jean-David (JIRA) noreply at atlassian.com
Fri Jan 29 08:40:33 EST 2010


hbm2ddl outputfiles should be comparables
-----------------------------------------

                 Key: HBX-1159
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1159
             Project: Hibernate Tools
          Issue Type: Improvement
    Affects Versions: 3.2.0.GA
            Reporter: Maillefer Jean-David
            Priority: Minor


It would be very helpful if hbm2ddl could generate comparable output files. By comparable, I mean that using a diff tool, the order of the generated SQL elements should be the same. It's already the case for columns. But it's missing for foreign-keys: each time hbm2ddl is run, their respective order is changed, thus making the use of diff tools nearly useless.

Sample code (for postgresql):
We can see that the order of primary-key fields membre_id and principal_id has changed, but the structure is the same !

Run 1:

    create table AdhesionId (
        id  serial not null,
        modification timestamp not null,
        version int4,
        membre_id int4 not null,
        principal_id int4 not null,
        primary key (id)
    );


Run 2 (after a modification to a field in another class):

    create table AdhesionId (
        id  serial not null,
        modification timestamp not null,
        version int4,
        principal_id int4 not null,
        membre_id int4 not null,
        primary key (id)
    );

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list