openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mprud...@apache.org
Subject svn commit: r598829 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingInfo.java
Date Wed, 28 Nov 2007 00:25:55 GMT
Author: mprudhom
Date: Tue Nov 27 16:25:53 2007
New Revision: 598829

URL: http://svn.apache.org/viewvc?rev=598829&view=rev
Log:
OPENJPA-223 Handle Indexes with multiple columns, which is a step towards a fix for OPENJPA-223

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingInfo.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingInfo.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingInfo.java?rev=598829&r1=598828&r2=598829&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingInfo.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingInfo.java
Tue Nov 27 16:25:53 2007
@@ -813,6 +813,9 @@
         if (_idx != null) {
             name = _idx.getName();
             unq = _idx.isUnique();
+            // preserve multiple columns if they are specified in the index
+            if (_idx.getColumns() != null && _idx.getColumns().length > 1)
+                cols = _idx.getColumns();
         } else
             unq = tmplate.isUnique();
 
@@ -1510,6 +1513,8 @@
         _idx = new Index();
         _idx.setName(idx.getName());
         _idx.setUnique(idx.isUnique());
+        if (idx.getColumns() != null && idx.getColumns().length > 1)
+            _idx.setColumns(idx.getColumns());
     }
 
     /**



Mime
View raw message