[openjpa] branch master updated: OPENJPA-2554 fix TestSchemaGenerationProperties on MySQL

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[openjpa] branch master updated: OPENJPA-2554 fix TestSchemaGenerationProperties on MySQL

struberg
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


The following commit(s) were added to refs/heads/master by this push:
     new 34c99b3  OPENJPA-2554 fix TestSchemaGenerationProperties on MySQL
34c99b3 is described below

commit 34c99b342a0d3b823b1c777d16b2dbba57350d5e
Author: Mark Struberg <[hidden email]>
AuthorDate: Fri Nov 2 22:23:28 2018 +0100

    OPENJPA-2554 fix TestSchemaGenerationProperties on MySQL
   
    MySQL on unix has case sensitive table names...
---
 .../jdbc/common/apps/AutoIncrementPC1.java         | 92 +++++++++++-----------
 .../jdbc/common/apps/AutoIncrementPC3.java         |  2 +-
 .../jdbc/common/apps/ConstantJoinPC4.java          |  2 +-
 .../jdbc/common/apps/ConstantJoinPC5.java          |  2 +-
 .../jdbc/common/apps/CustomMappingPC.java          |  2 +-
 .../persistence/jdbc/common/apps/DFGTest.java      |  2 +
 .../jdbc/common/apps/EagerOuterJoinPC.java         |  2 +
 .../persistence/jdbc/common/apps/EagerPC.java      |  2 +
 .../persistence/jdbc/common/apps/EagerPCSub.java   |  2 +
 .../persistence/jdbc/common/apps/HelperPC.java     |  3 +
 .../persistence/jdbc/common/apps/HelperPC2.java    |  2 +
 .../persistence/jdbc/common/apps/HelperPC3.java    |  2 +
 .../persistence/jdbc/common/apps/InvertA.java      |  2 +
 .../persistence/jdbc/common/apps/InvertB.java      |  2 +
 .../jdbc/maps/m2mmapex1/TestMany2ManyMapEx1.java   |  6 +-
 15 files changed, 72 insertions(+), 53 deletions(-)

diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC1.java
index 405f6e4..20ff940 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC1.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC1.java
@@ -33,75 +33,75 @@ import javax.persistence.Table;
 
 
 /**
- * <p>Persistent type used in testing.</p>
+ *    <p>Persistent type used in testing.</p>
  *
- * @author Abe White
+ *    @author        Abe White
  */
 @Entity
-@Table(name="autoincpc1")
+@Table(name="AUTOINCPC1")
 @Inheritance(strategy=InheritanceType.SINGLE_TABLE)
 public class AutoIncrementPC1
 {
 
     private Set setField = new HashSet ();
 
- @Id
- private int id;
+    @Id
+    private int id;
 
- @Column(name="strngfld", length=50)
- private String stringField = null;
+    @Column(name="strngfld", length=50)
+    private String stringField = null;
 
- @OneToOne(cascade={CascadeType.PERSIST, CascadeType.REMOVE})
- private AutoIncrementPC1 oneOne = null;
+    @OneToOne(cascade={CascadeType.PERSIST, CascadeType.REMOVE})
+    private AutoIncrementPC1 oneOne = null;
 
- public AutoIncrementPC1()
- {
- }
+    public AutoIncrementPC1()
+    {
+    }
 
- public AutoIncrementPC1(int key)
- {
- this.id = key;
- }
+    public AutoIncrementPC1(int key)
+    {
+        this.id = key;
+    }
 
- public Set getSetField ()
- {
- return this.setField;
- }
+    public Set getSetField ()
+    {
+        return this.setField;
+    }
 
- public void setSetField (Set setField)
- {
- this.setField = setField;
- }
+    public void setSetField (Set setField)
+    {
+        this.setField = setField;
+    }
 
 
- public String getStringField ()
- {
- return this.stringField;
- }
+    public String getStringField ()
+    {
+        return this.stringField;
+    }
 
 
- public void setStringField (String stringField)
- {
- this.stringField = stringField;
- }
+    public void setStringField (String stringField)
+    {
+        this.stringField = stringField;
+    }
 
 
- public AutoIncrementPC1 getOneOne ()
- {
- return this.oneOne;
- }
+    public AutoIncrementPC1 getOneOne ()
+    {
+        return this.oneOne;
+    }
 
 
- public void setOneOne (AutoIncrementPC1 oneOne)
- {
- this.oneOne = oneOne;
- }
+    public void setOneOne (AutoIncrementPC1 oneOne)
+    {
+        this.oneOne = oneOne;
+    }
 
- public int getId() {
- return id;
- }
+    public int getId() {
+        return id;
+    }
 
- public void setId(int id) {
- this.id = id;
- }
+    public void setId(int id) {
+        this.id = id;
+    }
 }
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC3.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC3.java
index 063e12e..1ff9c4c 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC3.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC3.java
@@ -38,7 +38,7 @@ import javax.persistence.Table;
  */
 @IdClass(AutoIncrementPC3Id.class)
 @Entity
-@Table(name="autoincpc3")
+@Table(name="AUTOINCPC3")
 public class AutoIncrementPC3
 {
  @Id
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC4.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC4.java
index c723b14..8ee2f40 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC4.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC4.java
@@ -31,7 +31,7 @@ import javax.persistence.OneToOne;
 import javax.persistence.Table;
 
 @Entity
-@Table(name="conjoinpc4")
+@Table(name="CONJOINPC4")
 public class ConstantJoinPC4
 {
  @Column(length=50)
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC5.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC5.java
index d5a3c18..0a8d2d3 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC5.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC5.java
@@ -24,7 +24,7 @@ import javax.persistence.Id;
 import javax.persistence.Table;
 
 @Entity
-@Table(name="conjoinpc5")
+@Table(name="CONJOINPC5")
 public class ConstantJoinPC5
 {
  @Id
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/CustomMappingPC.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/CustomMappingPC.java
index 25a3cf8..ed4b282 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/CustomMappingPC.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/CustomMappingPC.java
@@ -29,7 +29,7 @@ import javax.persistence.Table;
  */
 
 @Entity
-@Table(name="custmappc")
+@Table(name="CUSTMAPPC")
 public class CustomMappingPC
 {
 
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/DFGTest.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/DFGTest.java
index 40d8cf2..30bc644 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/DFGTest.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/DFGTest.java
@@ -19,6 +19,7 @@
 package org.apache.openjpa.persistence.jdbc.common.apps;
 
 import javax.persistence.Entity;
+import javax.persistence.Table;
 
 /**
  * <p>Persistent type used in testing.</p>
@@ -26,6 +27,7 @@ import javax.persistence.Entity;
  * @author Abe White
  */
 @Entity
+@Table(name="DFGTEST")
 public class DFGTest {
 
     private int dfgField;
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerOuterJoinPC.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerOuterJoinPC.java
index 3771318..ce42f40 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerOuterJoinPC.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerOuterJoinPC.java
@@ -24,6 +24,7 @@ import java.util.HashSet;
 import java.util.List;
 
 import javax.persistence.Entity;
+import javax.persistence.Table;
 
 /**
  * <p>Class that uses eager outer joins for its collection fields.</p>
@@ -31,6 +32,7 @@ import javax.persistence.Entity;
  * @author Abe White
  */
 @Entity
+@Table(name="EAGEROUTERJOINPC")
 public class EagerOuterJoinPC {
 
     private String name = null;
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerPC.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerPC.java
index edcd20a..4152047 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerPC.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerPC.java
@@ -28,6 +28,7 @@ import javax.persistence.Id;
 import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.OneToOne;
+import javax.persistence.Table;
 import javax.persistence.Transient;
 
 /**
@@ -36,6 +37,7 @@ import javax.persistence.Transient;
  * @author Abe White
  */
 @Entity
+@Table(name="EAGERPC")
 @Inheritance(strategy=InheritanceType.JOINED)
 public class EagerPC
 {
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerPCSub.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerPCSub.java
index b03551c..a8da451 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerPCSub.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerPCSub.java
@@ -24,6 +24,7 @@ import java.util.List;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.OneToMany;
+import javax.persistence.Table;
 import javax.persistence.Transient;
 
 /**
@@ -32,6 +33,7 @@ import javax.persistence.Transient;
  * @author Abe White
  */
 @Entity
+@Table(name="EAGERPCSUB")
 public class EagerPCSub extends EagerPC
 {
  private int intField;
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/HelperPC.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/HelperPC.java
index 520add1..2a16eb3 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/HelperPC.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/HelperPC.java
@@ -25,12 +25,15 @@ import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.OneToOne;
+import javax.persistence.Table;
+
 /**
  * <p>Persistent type used in testing.</p>
  *
  * @author Abe White
  */
 @Entity
+@Table(name="HELPERPC")
 public class HelperPC implements Serializable
 {
     private static final long serialVersionUID = 1L;
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/HelperPC2.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/HelperPC2.java
index bb6f43e..cfe0d2b 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/HelperPC2.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/HelperPC2.java
@@ -27,6 +27,7 @@ import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
 import javax.persistence.Id;
 import javax.persistence.OneToOne;
+import javax.persistence.Table;
 
 
 /**
@@ -35,6 +36,7 @@ import javax.persistence.OneToOne;
  * @author Abe White
  */
 @Entity
+@Table(name="HELPERPC2")
 public class HelperPC2
 {
  @Column(name="strngfld", length=50)
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/HelperPC3.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/HelperPC3.java
index 16f0032..ef59be1 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/HelperPC3.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/HelperPC3.java
@@ -23,6 +23,7 @@ import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
+import javax.persistence.Table;
 
 
 /**
@@ -31,6 +32,7 @@ import javax.persistence.InheritanceType;
  * @author Abe White
  */
 @Entity
+@Table(name="HELPERPC3")
 @Inheritance(strategy=InheritanceType.SINGLE_TABLE)
 public class HelperPC3
 {
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/InvertA.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/InvertA.java
index a2778ee..7050254 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/InvertA.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/InvertA.java
@@ -26,6 +26,7 @@ import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.OneToOne;
+import javax.persistence.Table;
 
 /**
  * Used to test invert one-to-ones and stuff
@@ -33,6 +34,7 @@ import javax.persistence.OneToOne;
  * @author skim
  */
 @Entity
+@Table(name="INVERTA")
 public class InvertA implements Serializable
 {
     private static final long serialVersionUID = 1L;
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/InvertB.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/InvertB.java
index 9217929..4f36cb3 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/InvertB.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/InvertB.java
@@ -25,6 +25,7 @@ import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.OneToOne;
+import javax.persistence.Table;
 
 
 /**
@@ -33,6 +34,7 @@ import javax.persistence.OneToOne;
  * @author skim
  */
 @Entity
+@Table(name="INVERTB")
 public class InvertB implements Serializable
 {
     private static final long serialVersionUID = 1L;
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/m2mmapex1/TestMany2ManyMapEx1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/m2mmapex1/TestMany2ManyMapEx1.java
index e356161..6872a78 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/m2mmapex1/TestMany2ManyMapEx1.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/maps/m2mmapex1/TestMany2ManyMapEx1.java
@@ -59,9 +59,9 @@ public class TestMany2ManyMapEx1 extends SQLListenerTestCase {
             Employee.class,
             PhoneNumber.class);
         createObj(emf);
-       rsAllPhones = getAll(PhoneNumber.class);
-       rsAllEmps = getAll(Employee.class);
-       rsAllDivisions = getAll(Division.class);
+        rsAllPhones = getAll(PhoneNumber.class);
+        rsAllEmps = getAll(Employee.class);
+        rsAllDivisions = getAll(Division.class);
     }
 
     @AllowFailure