mirror of https://github.com/apache/openjpa.git
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:
parent
ca76712e38
commit
f63e792243
|
@ -3484,8 +3484,12 @@ public class DBDictionary
|
||||||
StringBuilder buf = new StringBuilder();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append(create ? "CREATE" : "ALTER").append(" SEQUENCE ");
|
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");
|
maxTableNameLength, "long-seq-name");
|
||||||
|
//Now use the full sequence name (schema + sequence name).
|
||||||
|
String seqName = getFullName(seq);
|
||||||
|
|
||||||
buf.append(seqName);
|
buf.append(seqName);
|
||||||
if (create && seq.getInitialValue() != 0)
|
if (create && seq.getInitialValue() != 0)
|
||||||
|
|
Loading…
Reference in New Issue