diff --git a/hibernate-core/src/test/java/org/hibernate/metamodel/spi/binding/AbstractBasicBindingTests.java b/hibernate-core/src/test/java/org/hibernate/metamodel/spi/binding/AbstractBasicBindingTests.java index 9477d77818..4080567f0b 100644 --- a/hibernate-core/src/test/java/org/hibernate/metamodel/spi/binding/AbstractBasicBindingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/metamodel/spi/binding/AbstractBasicBindingTests.java @@ -108,8 +108,7 @@ public abstract class AbstractBasicBindingTests extends BaseUnitTestCase { assertEquals( "version is nullable", false, versionAttributeBinding.getRelationalValueBindings().get( 0 ).isNullable() ); } - @Test - public void testEntityWithManyToOneMapping() { + protected void testEntityWithManyToOneMapping(String defaultManyToOneColumnReferencingId) { MetadataSources sources = new MetadataSources( serviceRegistry ); addSourcesForSimpleEntityBinding( sources ); addSourcesForManyToOne( sources ); @@ -128,7 +127,7 @@ public abstract class AbstractBasicBindingTests extends BaseUnitTestCase { SingularAttributeBinding.class.cast( simpleEntityBinding.getHierarchyDetails().getEntityIdentifier().getAttributeBinding() ), - "simpleEntity", + defaultManyToOneColumnReferencingId, false ); diff --git a/hibernate-core/src/test/java/org/hibernate/metamodel/spi/binding/BasicAnnotationBindingTests.java b/hibernate-core/src/test/java/org/hibernate/metamodel/spi/binding/BasicAnnotationBindingTests.java index a84b072374..eef0449cc4 100644 --- a/hibernate-core/src/test/java/org/hibernate/metamodel/spi/binding/BasicAnnotationBindingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/metamodel/spi/binding/BasicAnnotationBindingTests.java @@ -55,9 +55,8 @@ public class BasicAnnotationBindingTests extends AbstractBasicBindingTests { sources.addAnnotatedClass( SimpleEntityWithSimpleComponent.SimpleComponent.class ); } - @Override @Test public void testEntityWithManyToOneMapping() { - super.testEntityWithManyToOneMapping(); + super.testEntityWithManyToOneMapping( "simpleEntity_id"); } } diff --git a/hibernate-core/src/test/java/org/hibernate/metamodel/spi/binding/BasicHbmBindingTests.java b/hibernate-core/src/test/java/org/hibernate/metamodel/spi/binding/BasicHbmBindingTests.java index ec5e685123..1440769cf0 100644 --- a/hibernate-core/src/test/java/org/hibernate/metamodel/spi/binding/BasicHbmBindingTests.java +++ b/hibernate-core/src/test/java/org/hibernate/metamodel/spi/binding/BasicHbmBindingTests.java @@ -23,6 +23,8 @@ */ package org.hibernate.metamodel.spi.binding; +import org.junit.Test; + import org.hibernate.metamodel.MetadataSources; /** @@ -51,4 +53,9 @@ public class BasicHbmBindingTests extends AbstractBasicBindingTests { public void addSourcesForComponentBinding(MetadataSources sources) { sources.addResource( "org/hibernate/metamodel/spi/binding/SimpleEntityWithSimpleComponent.hbm.xml" ); } + + @Test + public void testEntityWithManyToOneMapping() { + super.testEntityWithManyToOneMapping( "simpleEntity" ); + } } diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/collectionelement/CollectionElementTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/collectionelement/CollectionElementTest.java index 8157a70506..d67ef9edc8 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/collectionelement/CollectionElementTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/collectionelement/CollectionElementTest.java @@ -257,7 +257,6 @@ public class CollectionElementTest extends BaseCoreFunctionalTestCase { } @Test - @FailureExpectedWithNewMetamodel public void testDefaultFKNameForElementCollection() throws Exception { isCollectionColumnPresent( Boy.class, "hatedNames", "Boy_id" ); } diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/indexcoll/IndexedCollectionTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/indexcoll/IndexedCollectionTest.java index d744465c56..7e7bb45345 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/indexcoll/IndexedCollectionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/indexcoll/IndexedCollectionTest.java @@ -335,7 +335,6 @@ public class IndexedCollectionTest extends BaseCoreFunctionalTestCase { } @Test - @FailureExpectedWithNewMetamodel @RequiresDialect({HSQLDialect.class, H2Dialect.class}) @FailureExpectedWithNewMetamodel public void testComponentSubPropertyMapKey() throws Exception {