From 5681d06afe179d6497de09715796e536ce842fd2 Mon Sep 17 00:00:00 2001 From: Fay Wang Date: Thu, 16 Apr 2009 18:42:05 +0000 Subject: [PATCH] OPENJPA-1024: clean up testcases git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@765716 13f79535-47bb-0310-9956-ffa450edef68 --- .../openjpa/persistence/embed/EntityA_Coll_Embed_Embed.java | 2 ++ .../openjpa/persistence/embed/EntityA_Coll_Embed_ToOne.java | 2 ++ .../apache/openjpa/persistence/embed/EntityA_Coll_String.java | 2 ++ .../openjpa/persistence/embed/EntityA_Embed_Coll_Embed.java | 2 ++ .../openjpa/persistence/embed/EntityA_Embed_Coll_Integer.java | 2 ++ .../apache/openjpa/persistence/embed/EntityA_Embed_Embed.java | 2 ++ .../openjpa/persistence/embed/EntityA_Embed_Embed_ToMany.java | 2 ++ .../openjpa/persistence/embed/EntityA_Embed_MappedToOne.java | 2 ++ .../apache/openjpa/persistence/embed/EntityA_Embed_ToMany.java | 2 ++ .../apache/openjpa/persistence/embed/EntityA_Embed_ToOne.java | 2 ++ .../org/apache/openjpa/persistence/embed/TestEmbeddable.java | 3 --- 11 files changed, 20 insertions(+), 3 deletions(-) diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Coll_Embed_Embed.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Coll_Embed_Embed.java index 3e2958c14..bdd400445 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Coll_Embed_Embed.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Coll_Embed_Embed.java @@ -27,10 +27,12 @@ import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; +import javax.persistence.Table; import javax.persistence.ElementCollection; @Entity +@Table(name="TBL1A") public class EntityA_Coll_Embed_Embed implements Serializable { @Id Integer id; diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Coll_Embed_ToOne.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Coll_Embed_ToOne.java index bb7844a1c..aee67c357 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Coll_Embed_ToOne.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Coll_Embed_ToOne.java @@ -29,11 +29,13 @@ import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; +import javax.persistence.Table; import javax.persistence.ElementCollection; import javax.persistence.CollectionTable; @Entity +@Table(name="TBL2A") public class EntityA_Coll_Embed_ToOne implements Serializable { // contains a collection of Embed1ToOne // Embed1ToOne does not have an element collection or to-Many relationships diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Coll_String.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Coll_String.java index 6e1a1175a..5aa71ea19 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Coll_String.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Coll_String.java @@ -30,8 +30,10 @@ import javax.persistence.Id; import javax.persistence.ElementCollection; import javax.persistence.CollectionTable; +import javax.persistence.Table; @Entity +@Table(name="TBL3A") public class EntityA_Coll_String implements Serializable { @Id Integer id; diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_Coll_Embed.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_Coll_Embed.java index 9ba2518de..051332230 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_Coll_Embed.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_Coll_Embed.java @@ -27,8 +27,10 @@ import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; +import javax.persistence.Table; @Entity +@Table(name="TBL4A") public class EntityA_Embed_Coll_Embed implements Serializable { @Id Integer id; diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_Coll_Integer.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_Coll_Integer.java index 15cde8795..99c423341 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_Coll_Integer.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_Coll_Integer.java @@ -25,8 +25,10 @@ import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; +import javax.persistence.Table; @Entity +@Table(name="TBL5A") public class EntityA_Embed_Coll_Integer implements Serializable { @Id Integer id; diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_Embed.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_Embed.java index a78dbe97a..60d31e8d3 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_Embed.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_Embed.java @@ -25,8 +25,10 @@ import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; +import javax.persistence.Table; @Entity +@Table(name="TBL7A") public class EntityA_Embed_Embed implements Serializable { @Id Integer id; diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_Embed_ToMany.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_Embed_ToMany.java index 3daeaf63f..afe2b03c1 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_Embed_ToMany.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_Embed_ToMany.java @@ -26,8 +26,10 @@ import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; +import javax.persistence.Table; @Entity +@Table(name="TBL6A") public class EntityA_Embed_Embed_ToMany implements Serializable { @Id Integer id; diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_MappedToOne.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_MappedToOne.java index c0169cf13..eea8e2dfe 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_MappedToOne.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_MappedToOne.java @@ -25,8 +25,10 @@ import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; +import javax.persistence.Table; @Entity +@Table(name="TBL8A") public class EntityA_Embed_MappedToOne implements Serializable { @Id Integer id; diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_ToMany.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_ToMany.java index 6f93c06a0..4f797186c 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_ToMany.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_ToMany.java @@ -26,8 +26,10 @@ import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; +import javax.persistence.Table; @Entity +@Table(name="TBL9A") public class EntityA_Embed_ToMany implements Serializable { @Id Integer id; diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_ToOne.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_ToOne.java index c4652418f..cd6af37a2 100644 --- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_ToOne.java +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/EntityA_Embed_ToOne.java @@ -25,8 +25,10 @@ import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; +import javax.persistence.Table; @Entity +@Table(name="TB10A") public class EntityA_Embed_ToOne implements Serializable { @Id Integer id; 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 c8a5d3fa4..36c869295 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 @@ -277,9 +277,6 @@ public class TestEmbeddable extends SingleEMFTestCase { a.setAge(id); for (int i = 0; i < numEmbeddables; i++) { Embed_ToOne embed = createEmbed_ToOne(em, i+id); - EntityB1 b = new EntityB1(); - b.setId(id + i); - b.setName("b" + id + i); a.addEmbed1ToOne(embed); } em.persist(a);