From 8d1a767b3547c0fb3ce03512909276cc241fcff0 Mon Sep 17 00:00:00 2001 From: Hardy Ferentschik Date: Tue, 17 Jan 2012 11:55:46 +0100 Subject: [PATCH] METAGEN-67 Updating testcase - mapped super class does now not contain an id --- .../jpamodelgen/test/manytoone/ConcreteProduct.java | 5 +++-- .../test/manytoone/MappedSuperclassManyToOneTest.java | 4 +--- .../hibernate/jpamodelgen/test/manytoone/Product.java | 10 +++------- .../org/hibernate/jpamodelgen/test/manytoone/Shop.java | 4 +--- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/manytoone/ConcreteProduct.java b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/manytoone/ConcreteProduct.java index ef90ada57b..9532dc688d 100644 --- a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/manytoone/ConcreteProduct.java +++ b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/manytoone/ConcreteProduct.java @@ -14,15 +14,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - package org.hibernate.jpamodelgen.test.manytoone; import javax.persistence.Entity; +import javax.persistence.Id; /** * @author Hardy Ferentschik */ @Entity public class ConcreteProduct extends Product { + @Id + long id; } diff --git a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/manytoone/MappedSuperclassManyToOneTest.java b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/manytoone/MappedSuperclassManyToOneTest.java index 6f296cb459..49de0353f7 100644 --- a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/manytoone/MappedSuperclassManyToOneTest.java +++ b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/manytoone/MappedSuperclassManyToOneTest.java @@ -14,8 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - package org.hibernate.jpamodelgen.test.manytoone; import org.testng.annotations.Test; @@ -34,7 +32,7 @@ public class MappedSuperclassManyToOneTest extends CompilationTest { assertMetamodelClassGeneratedFor( ConcreteProduct.class ); assertMetamodelClassGeneratedFor( Product.class ); assertMetamodelClassGeneratedFor( Shop.class ); - assertPresenceOfFieldInMetamodelFor( Product.class, "shop", "The many to one attribute shop shop is missing" ); + assertPresenceOfFieldInMetamodelFor( Product.class, "shop", "The many to one attribute shop is missing" ); } @Override diff --git a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/manytoone/Product.java b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/manytoone/Product.java index bf92809585..4d7cbefcbf 100644 --- a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/manytoone/Product.java +++ b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/manytoone/Product.java @@ -14,12 +14,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - package org.hibernate.jpamodelgen.test.manytoone; -import javax.persistence.Entity; -import javax.persistence.Id; +import javax.persistence.Access; +import javax.persistence.AccessType; import javax.persistence.ManyToOne; import javax.persistence.MappedSuperclass; @@ -30,9 +28,7 @@ import org.hibernate.jpamodelgen.test.accesstype.Shop; */ @MappedSuperclass public class Product { - @Id - long id; - + @Access(AccessType.FIELD) @ManyToOne Shop shop; } diff --git a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/manytoone/Shop.java b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/manytoone/Shop.java index 5d4cf0af4f..866e055c41 100644 --- a/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/manytoone/Shop.java +++ b/tooling/metamodel-generator/src/test/java/org/hibernate/jpamodelgen/test/manytoone/Shop.java @@ -14,8 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - package org.hibernate.jpamodelgen.test.manytoone; import javax.persistence.Entity; @@ -24,7 +22,7 @@ import javax.persistence.Id; /** * @author Hardy Ferentschik */ -@Entity +@Entity public class Shop { @Id long id;