[ http://issues.apache.org/jira/browse/DDLUTILS-106?page=all ]
Thomas Dudziak resolved DDLUTILS-106:
-------------------------------------
Resolution: Won't Fix
Adding any checks against other foreign keys in the same model would mean
introducing a lot of changes to the public API because foreign key names are
used in a lot of places where only the table of the foreign key is available,
but not the model. Since the benefit of such a check is IMO only minor, I'll
rather add a warning when a foreign key without a name is encountered.
> Long similar foreign key names are shortened to conflicting names
> -----------------------------------------------------------------
>
> Key: DDLUTILS-106
> URL: http://issues.apache.org/jira/browse/DDLUTILS-106
> Project: DdlUtils
> Type: Bug
> Components: Core
> Reporter: Christoffer Hammarström
> Assignee: Thomas Dudziak
>
> In my generated sql for Oracle, i find the following two conflicting
> statements:
> ALTER TABLE doc_permission_sets
> ADD CONSTRAINT doc_permission_ermission_sets FOREIGN KEY (set_id)
> REFERENCES permission_sets (set_id);
> and
> ALTER TABLE doc_permission_sets_ex
> ADD CONSTRAINT doc_permission_ermission_sets FOREIGN KEY (set_id)
> REFERENCES permission_sets (set_id);
> The tables have similar names, and the foreign key names conflict.
> Oracle gives the following error when trying to run the sql:
> ORA-02264: name already used by an existing constraint
> Maybe SqlBuilder.shortenName() could use some kind of counter for conflicting
> names?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira