openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fa...@apache.org
Subject svn commit: r954345 - /openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
Date Mon, 14 Jun 2010 01:47:08 GMT
Author: fancy
Date: Mon Jun 14 01:47:08 2010
New Revision: 954345

URL: http://svn.apache.org/viewvc?rev=954345&view=rev
Log:
OPENJPA-1697: A EnumValueHandler strategy along with XmlType annotation incorrectly mapped
to XmlType in create table DDL

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java?rev=954345&r1=954344&r2=954345&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
Mon Jun 14 01:47:08 2010
@@ -1537,11 +1537,13 @@ public class AnnotationPersistenceMappin
         // cache the JAXB XmlType class if it is present so we do not
         // have a hard-wired dependency on JAXB here
         Class xmlTypeClass = null;
-        try {
-            xmlTypeClass = Class.forName("javax.xml.bind.annotation.XmlType");
-        } catch (Exception e) {
+        if (fm.getValueInfo().getStrategy() != null &&
+            fm.getValueInfo().getStrategy().equals("org.apache.openjpa.jdbc.meta.strats.XMLValueHandler"))
{
+            try {
+                xmlTypeClass = Class.forName("javax.xml.bind.annotation.XmlType");
+            } catch (Exception e) {
+            }
         }
-
         int unique = 0;
         DBIdentifier sSecondary = DBIdentifier.NULL;
         for (int i = 0; i < pcols.length; i++) {



Mime
View raw message