Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.3.1
-
Fix Version/s: 1.3.3
-
Component/s: Persistence
-
Labels:None
-
Environment:Doubt that it makes any difference but the configuration is for org.hibernate.dialect.Oracle10gDialect
Description
Column order for a joinTable in the DDL generated by grails schema-export is not consistent.
This is a pain as I need to diff the DDL of different versions of my project to find changes but the diff output includes lines where there wasn't a real change (only the order of the columns in the output). The source file didn't change.
As I understand it the columns in the DDL are intended to be: id, version, then the remaining columns alphabetically.
The problem specifically occured with a mapping like this:
class Person {
...
static hasMany = [
managedDepartments : Department
...
]
static mapping =
{ managedDepartments joinTable: [name: 't_dept_managers', key:'person_id', column:'dept_id'] }}
diff target/ddl.sql previous_ddl.sql
...
< create table t_dept_managers (dept_id number(19,0) not null, person_id number(19,0) not null, primary key (dept_id, person_id));
—
> create table t_dept_managers (person_id number(19,0) not null, dept_id number(19,0) not null, primary key (dept_id, person_id));
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
The DDL is generated by Hibernate, the code for which is beyond our control. You'll need to raise a JIRA in the Hibernate JIRA