You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by st...@apache.org on 2021/05/02 20:08:54 UTC
[openjpa] branch master updated (5dc56fa -> 8e3b815)
This is an automated email from the ASF dual-hosted git repository.
struberg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/openjpa.git.
from 5dc56fa OPENJPA-2868 update invalidColumnNames for MariaDB
new d78bfc4 OPENJPA-2866 fix identifier unit test
new 8e3b815 switch back to dbcp for oracle as well
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../openjpa/persistence/embed/TestEmbeddable.java | 39 ++--------------------
pom.xml | 3 --
2 files changed, 2 insertions(+), 40 deletions(-)
[openjpa] 02/02: switch back to dbcp for oracle as well
Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
struberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openjpa.git
commit 8e3b81521fd21243c52fe27ec0d7b3b5dd10462d
Author: Mark Struberg <st...@apache.org>
AuthorDate: Sun May 2 21:54:05 2021 +0200
switch back to dbcp for oracle as well
---
pom.xml | 3 ---
1 file changed, 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index eeb84a3..e4d6232 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1508,9 +1508,6 @@
<oracle.server.version>latest</oracle.server.version>
<docker.external.oracle.port>1521</docker.external.oracle.port>
- <!-- Oracle Driver + XE11 seems to not play well with DBCP2 -->
- <tests.openjpa.driverDataSource>simple</tests.openjpa.driverDataSource>
-
<connection.driver.name>oracle.jdbc.driver.OracleDriver</connection.driver.name>
<openjpa.oracle.database>openjpatst</openjpa.oracle.database>
<openjpa.oracle.username>openjpatst</openjpa.oracle.username>
[openjpa] 01/02: OPENJPA-2866 fix identifier unit test
Posted by st...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
struberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openjpa.git
commit d78bfc47cb505aad70f1d7380df11dfa65440a8e
Author: Mark Struberg <st...@apache.org>
AuthorDate: Sun May 2 21:53:12 2021 +0200
OPENJPA-2866 fix identifier unit test
Oracle now supports IDENTITY columns since a very long time.
No need to rely on ancient index creation stuff.
---
.../openjpa/persistence/embed/TestEmbeddable.java | 39 ++--------------------
1 file changed, 2 insertions(+), 37 deletions(-)
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 e19cc5f..a40e340 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
@@ -30,7 +30,6 @@ import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
-import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -41,10 +40,6 @@ import javax.persistence.PersistenceUnitUtil;
import javax.persistence.Query;
import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
-import org.apache.openjpa.jdbc.meta.MappingTool;
-import org.apache.openjpa.jdbc.meta.MappingTool.Flags;
-import org.apache.openjpa.jdbc.sql.DBDictionary;
-import org.apache.openjpa.jdbc.sql.OracleDictionary;
import org.apache.openjpa.persistence.ArgumentException;
import org.apache.openjpa.persistence.OpenJPAEntityManager;
import org.apache.openjpa.persistence.OpenJPAEntityManagerSPI;
@@ -107,10 +102,6 @@ public class TestEmbeddable extends SQLListenerTestCase {
EntityA_Embed_Single_Coll.class, Embed_Single_Coll.class, EntityA_Embed.class,
EntityA_Embed_Complex.class, A.class, CLEAR_TABLES);
sql.clear();
- DBDictionary dict = ((JDBCConfiguration)emf.getConfiguration()).getDBDictionaryInstance();
- if (dict.getClass().getName().toLowerCase(Locale.ENGLISH).indexOf("oracle") != -1) {
- ((OracleDictionary)dict).useTriggersForAutoAssign = true;
- }
}
public void testGroupByEmbed() {
@@ -2786,14 +2777,9 @@ public class TestEmbeddable extends SQLListenerTestCase {
*/
public void createEmbeddableContainingRelationWithGeneratedKey()
throws IOException, SQLException {
- EntityManager em = emf.createEntityManager();
-
- OpenJPAEntityManagerSPI ojem = (OpenJPAEntityManagerSPI)em;
+ OpenJPAEntityManagerSPI ojem = emf.createEntityManager();
+ EntityManager em = ojem;
JDBCConfiguration conf = (JDBCConfiguration) ojem.getConfiguration();
- DBDictionary dict = conf.getDBDictionaryInstance();
- if (dict instanceof OracleDictionary) {
- recreateOracleArtifacts((OracleDictionary)dict, conf);
- }
EntityTransaction tran = em.getTransaction();
Book b = new Book(1590596455);
@@ -2819,27 +2805,6 @@ public class TestEmbeddable extends SQLListenerTestCase {
}
/*
- * This method uses the mapping tool to regenerate Oracle db artifacts
- * with the useTriggersForAutoAssign db option enabled.
- */
- private void recreateOracleArtifacts(OracleDictionary dict,
- JDBCConfiguration conf) throws IOException, SQLException {
- dict.useTriggersForAutoAssign = true;
- Flags flags = new MappingTool.Flags();
- flags.dropTables = true;
- flags.schemaAction = "drop,add";
- flags.sequences = true;
- flags.ignoreErrors = true;
- flags.dropSequences = true;
- MappingTool.run(
- conf,
- new String[] { "org.apache.openjpa.persistence.embed.Book" },
- flags,
- conf.getClassResolverInstance().
- getClassLoader(MappingTool.class, null));
- }
-
- /*
* EntityA_Embed_Complex routines
*/
public void testEntityA_Embed_Complex() {