diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/ColDefTestEntity.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/ColDefTestEntity.java index a1981a1d5..b14b71e71 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/ColDefTestEntity.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/ColDefTestEntity.java @@ -43,15 +43,15 @@ public class ColDefTestEntity { private int id; @OneToMany(cascade=CascadeType.PERSIST) - @OrderColumn(name="one2McoldefOrder", columnDefinition="BIGINT") + @OrderColumn(name="one2McoldefOrder", columnDefinition="INTEGER") private List one2Mcoldef; @ElementCollection - @OrderColumn(name="colcoldefOrder", columnDefinition="BIGINT") + @OrderColumn(name="colcoldefOrder", columnDefinition="INTEGER") private Set collcoldef; @ManyToMany(cascade=CascadeType.PERSIST) - @OrderColumn(name="m2McoldefOrder", columnDefinition="BIGINT") + @OrderColumn(name="m2McoldefOrder", columnDefinition="INTEGER") private List m2mcoldef; public void setOne2Mcoldef(List one2Mcoldef) { diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Inning.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Inning.java index 81584e070..962f3c5bc 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Inning.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Inning.java @@ -23,7 +23,7 @@ import javax.persistence.Embeddable; @Embeddable public class Inning { - private int number; + private int inningNumber; private int hitsHome; @@ -33,17 +33,17 @@ public class Inning { } 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 class Inning { 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(); } diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Player.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Player.java index 470b72388..fb6373c5f 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Player.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/Player.java @@ -27,7 +27,7 @@ import javax.persistence.OrderColumn; @Entity public class Player extends Person { - private int number; + private int playerNumber; @ManyToMany(mappedBy="playersTrained") private List trainers; @@ -41,15 +41,15 @@ public class Player extends Person { 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 trainers) { @@ -64,7 +64,7 @@ public class Player extends Person { if (obj instanceof Player) { Player player = (Player)obj; return super.equals(obj) && - player.getNumber() == number; + player.getPlayerNumber() == playerNumber; } return false; } diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumnXML.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumnXML.java index 016f7a4d7..b0e24264d 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumnXML.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumnXML.java @@ -89,15 +89,9 @@ public class TestOrderColumnXML extends AbstractCachedEMFTestCase { } /* - * 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 @@ public class TestOrderColumnXML extends AbstractCachedEMFTestCase { // // 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();