[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-2853) it's not possible to generate non-clashing unique index names for a dialect with supportsUniqueConstraintInCreateAlterTable=false
craig mcmillan (JIRA)
noreply at atlassian.com
Thu Sep 20 09:10:15 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
craig mcmillan updated HHH-2853:
--------------------------------
Attachment: tags.v325.r14012.patch
a patch against tags/v325 at revision 14012 to permit a Dialect to modify an index name to meet database namespace requirements
> it's not possible to generate non-clashing unique index names for a dialect with supportsUniqueConstraintInCreateAlterTable=false
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: HHH-2853
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2853
> Project: Hibernate3
> Issue Type: New Feature
> Components: core
> Affects Versions: 3.2.0.ga
> Environment: hibernate 3.2.0ga / oracle 10g
> Reporter: craig mcmillan
> Attachments: tags.v325.r14012.patch
>
>
> i am attempting to use a dialect derived from Oracle9Dialect, with supportsUniqueConstraintInCreateAlterTable=false, so that "create unique index ..." ddl statements will be generated by SchemaExport. having unique indexes done inside create/alter table statements is no good, because arbitrary names are given to the index by the db, and our application needs specific names to use in schema migration scripts
> problem is, that oracle has a schema-wide namespace for index names, and so a UniqueConstraint name [ of the form "keyN" ] can't be used as the index name as-is, 'cos it will clash with other unique indexes in the same oracle schema
> solution is simple : a method on the Dialect to add a prefix or suffix to the UniqueConstraint name, and a mod to Index.buildSqlCreateIndexString() to call that method. my derived Dialect could then create a unique index name which has a prefix munged from the tablename
> i'm happy to do a patch. will you accept ?
--
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