OPENJPA-1596: use unqualified name to check index name length

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@938571 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Fay Wang 2010-04-27 17:12:26 +00:00
parent 90355300bb
commit aef5474423
1 changed files with 6 additions and 1 deletions

View File

@ -3408,8 +3408,13 @@ public class DBDictionary
buf.append("CREATE ");
if (index.isUnique())
buf.append("UNIQUE ");
String indexName = checkNameLength(toDBName(index.getIdentifier()), maxIndexNameLength,
DBIdentifier fullIdxName = index.getIdentifier();
DBIdentifier unQualifiedName = fullIdxName.getUnqualifiedName();
checkNameLength(toDBName(unQualifiedName), maxIndexNameLength,
"long-index-name");
String indexName = toDBName(fullIdxName);
buf.append("INDEX ").append(indexName);
buf.append(" ON ").append(getFullName(index.getTable(), false));
buf.append(" (").append(namingUtil.appendColumns(index.getColumns())).