openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Woods <dwo...@apache.org>
Subject Re: svn commit: r936449 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
Date Wed, 21 Apr 2010 20:36:37 GMT
Fay, please open a new JIRA for this, as 1596 has already been marked as
resolved and included in the 2.0.0 release notes.


-Donald


On 4/21/10 3:11 PM, faywang@apache.org wrote:
> Author: faywang
> Date: Wed Apr 21 19:11:45 2010
> New Revision: 936449
> 
> URL: http://svn.apache.org/viewvc?rev=936449&view=rev
> Log:
> OPENJPA-1596: fix index name for DB2 zOS when schema is present.
> 
> Modified:
>     openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
> 
> Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
> URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java?rev=936449&r1=936448&r2=936449&view=diff
> ==============================================================================
> --- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
(original)
> +++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
Wed Apr 21 19:11:45 2010
> @@ -33,6 +33,7 @@ import java.util.Set;
>  import java.util.StringTokenizer;
>  
>  import org.apache.openjpa.jdbc.identifier.DBIdentifier;
> +import org.apache.openjpa.jdbc.identifier.QualifiedDBIdentifier;
>  import org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration;
>  import org.apache.openjpa.jdbc.kernel.exps.FilterValue;
>  import org.apache.openjpa.jdbc.kernel.exps.Lit;
> @@ -912,8 +913,10 @@ public class DB2Dictionary
>              // build the index for the sequence tables
>              // the index name will be the fully qualified table name + _IDX
>              Table tab = schema.getTable(table);
> -            DBIdentifier idxName = DBIdentifier.append(tab.getFullIdentifier(), "IDX");
> -            Index idx = tab.addIndex(getValidIndexName(idxName, tab));
> +            DBIdentifier fullIdxId = tab.getFullIdentifier().clone();
> +            DBIdentifier unQualifiedName = DBIdentifier.append(fullIdxId.getUnqualifiedName(),
"IDX");
> +            fullIdxId.setName(getValidIndexName(unQualifiedName, tab));
> +            Index idx = tab.addIndex(fullIdxId);
>              idx.setUnique(true);
>              idx.addColumn(pkColumn);
>          }
> 
> 
> 

Mime
View raw message