mirror of https://github.com/apache/openjpa.git
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
This commit is contained in:
parent
bda0136758
commit
643f4d130f
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue