This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch javax-index
in repository https://gitbox.apache.org/repos/asf/openjpa.git


The following commit(s) were added to refs/heads/javax-index by this push:
     new 19f0608  @Table indexes seems to work
19f0608 is described below

commit 19f06085fb008009003f308e8e08398316c54665
Author: Maxim Solodovnik <[email protected]>
AuthorDate: Tue Feb 26 22:09:31 2019 +0700

    @Table indexes seems to work
---
 .../persistence/jdbc/AnnotationPersistenceMappingParser.java        | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
 
b/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
index 2642a3b..069de58 100644
--- 
a/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
+++ 
b/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
@@ -617,9 +617,7 @@ public class AnnotationPersistenceMappingParser
         }
         addUniqueConstraints(tName.getName(), cm, cm.getMappingInfo(),
             table.uniqueConstraints());
-        for (javax.persistence.Index idx : table.indexes()) {
-            parseIndex(cm.getMappingInfo(), idx);
-        }
+        addIndices(tName.getName(), cm, cm.getMappingInfo(), table.indexes());
     }
 
     Unique createUniqueConstraint(MetaDataContext ctx, UniqueConstraint anno) {
@@ -1718,7 +1716,7 @@ public class AnnotationPersistenceMappingParser
                     .getDBDictionary();
                 if (dict.supportsXMLColumn)
                     // column maps to xml type
-                    ((Column) 
cols.get(i)).setTypeIdentifier(DBIdentifier.newColumnDefinition(dict.xmlTypeName));
+                    
cols.get(i).setTypeIdentifier(DBIdentifier.newColumnDefinition(dict.xmlTypeName));
             }
 
             unique |= (pcols[i].unique()) ? TRUE : FALSE;

Reply via email to