openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r814984 - /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java
Date Tue, 15 Sep 2009 03:33:29 GMT
Author: ppoddar
Date: Tue Sep 15 03:33:28 2009
New Revision: 814984

URL: http://svn.apache.org/viewvc?rev=814984&view=rev
Log:
Configure for trigger for auto-assign in Oracle

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java?rev=814984&r1=814983&r2=814984&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java
Tue Sep 15 03:33:28 2009
@@ -34,6 +34,9 @@
 import javax.persistence.Query;
 
 
+import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
+import org.apache.openjpa.jdbc.sql.DBDictionary;
+import org.apache.openjpa.jdbc.sql.OracleDictionary;
 import org.apache.openjpa.lib.log.Log;
 import org.apache.openjpa.persistence.ArgumentException;
 import org.apache.openjpa.persistence.test.SQLListenerTestCase;
@@ -94,6 +97,10 @@
             Book.class, Listing.class, Seller.class,
             EntityA_Embed_Complex.class, CLEAR_TABLES);
             sql.clear();
+            DBDictionary dict = ((JDBCConfiguration)emf.getConfiguration()).getDBDictionaryInstance();
+            if (dict.getClass().getName().indexOf("oracle") != -1) {
+                ((OracleDictionary)dict).useTriggersForAutoAssign = true;
+            }
     }
     
     public void testEntityA_Coll_String() {



Mime
View raw message