Prevent this class from attempting to build its schema when using a database that doesn't support XML datatypes.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@563661 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Patrick Linskey 2007-08-07 21:16:55 +00:00
parent 09e13c4ad8
commit fa39addf82
1 changed files with 9 additions and 0 deletions

View File

@ -34,6 +34,7 @@ import org.apache.openjpa.jdbc.sql.OracleDictionary;
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 @@ public class TestXMLCustomerOrder
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