[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4867) hbm2ddl outputfiles should be comparables

Max Rydahl Andersen (JIRA) noreply at atlassian.com
Mon Feb 1 03:16:30 EST 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Max Rydahl Andersen updated HHH-4867:
-------------------------------------

    Affects Version/s: 3.3.2
          Component/s: metamodel
                       core

Moved to core since the sequence in the output from tools is driven by whatever sequence that is returned from the core.

> hbm2ddl outputfiles should be comparables
> -----------------------------------------
>
>                 Key: HHH-4867
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4867
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core, metamodel
>    Affects Versions: 3.3.2
>            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