openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r563661 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.java
Date Tue, 07 Aug 2007 21:16:56 GMT
Author: pcl
Date: Tue Aug  7 14:16:55 2007
New Revision: 563661

URL: http://svn.apache.org/viewvc?view=rev&rev=563661
Log:
Prevent this class from attempting to build its schema when using a database that doesn't
support XML datatypes.

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.java?view=diff&rev=563661&r1=563660&r2=563661
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/query/TestXMLCustomerOrder.java
Tue Aug  7 14:16:55 2007
@@ -34,6 +34,7 @@
 import org.apache.openjpa.jdbc.sql.SQLServerDictionary;
 import org.apache.openjpa.persistence.OpenJPAEntityManager;
 import org.apache.openjpa.persistence.OpenJPAPersistence;
+import org.apache.openjpa.persistence.OpenJPAEntityManagerFactory;
 import org.apache.openjpa.persistence.test.SQLListenerTestCase;
 import org.apache.openjpa.persistence.xmlmapping.xmlbindings.myaddress.*;
 import org.apache.openjpa.persistence.xmlmapping.entities.*;
@@ -49,6 +50,14 @@
     extends SQLListenerTestCase {
 
     public void setUp() {
+        OpenJPAEntityManagerFactory emf = createEMF();
+        DBDictionary dict = ((JDBCConfiguration) emf.getConfiguration())
+            .getDBDictionaryInstance();
+
+        // skip if dictionary has no support for XML column type
+        if (!dict.supportsXMLColumn)
+            return;
+
         setUp(org.apache.openjpa.persistence.xmlmapping.entities.Customer.class
             , org.apache.openjpa.persistence.xmlmapping.entities.Customer
                 .CustomerKey.class



Mime
View raw message