openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jrba...@apache.org
Subject svn commit: r813556 - in /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order: ColDefTestEntity.java Inning.java Player.java TestOrderColumnXML.java
Date Thu, 10 Sep 2009 19:31:01 GMT
Author: jrbauer
Date: Thu Sep 10 19:31:01 2009
New Revision: 813556

URL: http://svn.apache.org/viewvc?rev=813556&view=rev
Log:
OPENJPA-869 Fixup order column test variations failing on Oracle.

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/ColDefTestEntity.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Inning.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Player.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumnXML.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/ColDefTestEntity.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/ColDefTestEntity.java?rev=813556&r1=813555&r2=813556&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/ColDefTestEntity.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/ColDefTestEntity.java
Thu Sep 10 19:31:01 2009
@@ -43,15 +43,15 @@
     private int id;
     
     @OneToMany(cascade=CascadeType.PERSIST)
-    @OrderColumn(name="one2McoldefOrder", columnDefinition="BIGINT")
+    @OrderColumn(name="one2McoldefOrder", columnDefinition="INTEGER")
     private List<ColDefTestElement> one2Mcoldef;
 
     @ElementCollection
-    @OrderColumn(name="colcoldefOrder", columnDefinition="BIGINT")
+    @OrderColumn(name="colcoldefOrder", columnDefinition="INTEGER")
     private Set<ColDefTestElement> collcoldef;
     
     @ManyToMany(cascade=CascadeType.PERSIST)
-    @OrderColumn(name="m2McoldefOrder", columnDefinition="BIGINT")
+    @OrderColumn(name="m2McoldefOrder", columnDefinition="INTEGER")
     private List<ColDefTestElement> m2mcoldef;
 
     public void setOne2Mcoldef(List<ColDefTestElement> one2Mcoldef) {

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Inning.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Inning.java?rev=813556&r1=813555&r2=813556&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Inning.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Inning.java
Thu Sep 10 19:31:01 2009
@@ -23,7 +23,7 @@
 @Embeddable
 public class Inning {
 
-    private int number;
+    private int inningNumber;
     
     private int hitsHome;
     
@@ -33,17 +33,17 @@
     }
 
     public Inning(int num, int hh, int ha) {        
-        number = num;
+        inningNumber = num;
         hitsHome = hh;
         hitsAway = ha;
     }
 
-    public void setNumber(int number) {
-        this.number = number;
+    public void setInningNumber(int number) {
+        this.inningNumber = number;
     }
 
-    public int getNumber() {
-        return number;
+    public int getInningNumber() {
+        return inningNumber;
     }
 
     public void setHitsHome(int hitsHome) {
@@ -65,7 +65,7 @@
     public boolean equals(Object obj) {
         if (obj instanceof Inning) {
             Inning in = (Inning)obj;
-            return getNumber() == in.getNumber() &&
+            return getInningNumber() == in.getInningNumber() &&
                 getHitsHome() == in.getHitsHome() &&
                 getHitsAway() == in.getHitsAway();
         }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Player.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Player.java?rev=813556&r1=813555&r2=813556&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Player.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Player.java
Thu Sep 10 19:31:01 2009
@@ -27,7 +27,7 @@
 @Entity
 public class Player extends Person {
     
-    private int number;
+    private int playerNumber;
 
     @ManyToMany(mappedBy="playersTrained")
     private List<Trainer> trainers;
@@ -41,15 +41,15 @@
     
     public Player(String name, int number) {
         setName(name);
-        this.number = number;
+        this.playerNumber = number;
     }
 
-    public void setNumber(int number) {
-        this.number = number;
+    public void setPlayerNumber(int number) {
+        this.playerNumber = number;
     }
 
-    public int getNumber() {
-        return number;
+    public int getPlayerNumber() {
+        return playerNumber;
     }    
 
     public void setTrainers(List<Trainer> trainers) {
@@ -64,7 +64,7 @@
         if (obj instanceof Player) {
             Player player = (Player)obj;
             return super.equals(obj) &&
-                player.getNumber() == number;
+                player.getPlayerNumber() == playerNumber;
         }
         return false;
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumnXML.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumnXML.java?rev=813556&r1=813555&r2=813556&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumnXML.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumnXML.java
Thu Sep 10 19:31:01 2009
@@ -89,15 +89,9 @@
     }
     
     /*
-     * Validates the use of the columnDefinition attribute on OrderColumn. This
-     * test will be skipped unless the database in use is Derby since the 
-     * annotation column definition attribute value is hard coded and all 
-     * databases may not support the supplied column definition. 
+     * Validates the use of the columnDefinition attribute on OrderColumn.
      */
     public void testOrderColumnColumnDefinition() {
-        if (!isTargetPlatform("derby")) {
-            return;
-        }
 
         OpenJPAEntityManagerFactorySPI emf1 = 
             (OpenJPAEntityManagerFactorySPI)OpenJPAPersistence.
@@ -110,13 +104,13 @@
         // 
         // Create a collection using a custom column definition
         validateOrderColumnDef(emf1, ColDefTestEntity.class, 
-            "one2Mcoldef", "BIGINT");
+            "one2Mcoldef", "INTEGER");
 
         validateOrderColumnDef(emf1, ColDefTestEntity.class, 
-            "collcoldef", "BIGINT");
+            "collcoldef", "INTEGER");
 
         validateOrderColumnDef(emf1, ColDefTestEntity.class, 
-            "m2mcoldef", "BIGINT");
+            "m2mcoldef", "INTEGER");
 
         // Add and query some values
         ColDefTestEntity cdent = new ColDefTestEntity();



Mime
View raw message