OPENJPA-2387: Fix to exclude schema name when checking the length of a sequence name. Made update to ensure schema is used after length is calculated.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1508188 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Heath Thomann 2013-07-29 19:27:27 +00:00
parent ca76712e38
commit f63e792243
1 changed files with 5 additions and 1 deletions

View File

@ -3484,8 +3484,12 @@ public class DBDictionary
StringBuilder buf = new StringBuilder();
buf.append(create ? "CREATE" : "ALTER").append(" SEQUENCE ");
String seqName = checkNameLength(toDBName(seq.getFullIdentifier().getUnqualifiedName()),
//Strip off the schema and verify the sequence name is within the legal length, NOT
//the schema name + sequence name.
checkNameLength(toDBName(seq.getFullIdentifier().getUnqualifiedName()),
maxTableNameLength, "long-seq-name");
//Now use the full sequence name (schema + sequence name).
String seqName = getFullName(seq);
buf.append(seqName);
if (create && seq.getInitialValue() != 0)