[hibernate-issues] [Hibernate-JIRA] Created: (ANN-673) Guaranty column order in genereted schema
Ivo Danihelka (JIRA)
noreply at atlassian.com
Tue Oct 30 13:19:39 EDT 2007
Guaranty column order in genereted schema
-----------------------------------------
Key: ANN-673
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-673
Project: Hibernate Annotations
Issue Type: Bug
Components: binder
Affects Versions: 3.2.1, 3.3.1
Environment: Hibernate 3.2.1 and SVN, PostgreSQL 8.1
Reporter: Ivo Danihelka
Priority: Minor
Attachments: fk-order.path
Problem:
- AnnotationConfiguration does not define stable ordering for foreign key columns. They then could appear in generated SQL schema in any order. For example, sometimes table foreign key column person_id is before another foreign key column dog_id and sometimes it is behind it.
Tool hbm2ddl could be used to see the generated schema. The order of foreign key columns in one table changes
when unrelated change is made inside mapping of a different table.
Proposed Solution:
- Don't base the ordering of foreign keys on hashCode. Base it on tableName+propertyName.
A patch against hibernate 3.2.1 is attached (it also backportes #ANN-551 into 3.2.1).
--
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