[ http://issues.apache.org/jira/browse/DDLUTILS-106?page=comments#action_12402313 ]
Christoffer Hammarström commented on DDLUTILS-106: -------------------------------------------------- I didn't realise i could specify a foreign key name. Silly me. :) In that case it shouldn't be a problem. Thanks! > 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
