From 643f4d130f3c5426194ee7775685e85977584f79 Mon Sep 17 00:00:00 2001 From: Pinaki Poddar Date: Tue, 15 Sep 2009 03:33:28 +0000 Subject: [PATCH] Configure for trigger for auto-assign in Oracle git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@814984 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/openjpa/persistence/embed/TestEmbeddable.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java index 2404dc7f3..15574d55a 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java @@ -34,6 +34,9 @@ import javax.persistence.EntityTransaction; 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 @@ public class TestEmbeddable extends SQLListenerTestCase { 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() {