HHH-7919 : Miscellaneous bugfixes

This commit is contained in:
Gail Badner 2013-05-23 12:02:34 -07:00
parent 4293814f92
commit 0c199b0374
5 changed files with 10 additions and 7 deletions

View File

@ -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
);

View File

@ -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");
}
}

View File

@ -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" );
}
}

View File

@ -257,7 +257,6 @@ public class CollectionElementTest extends BaseCoreFunctionalTestCase {
}
@Test
@FailureExpectedWithNewMetamodel
public void testDefaultFKNameForElementCollection() throws Exception {
isCollectionColumnPresent( Boy.class, "hatedNames", "Boy_id" );
}

View File

@ -335,7 +335,6 @@ public class IndexedCollectionTest extends BaseCoreFunctionalTestCase {
}
@Test
@FailureExpectedWithNewMetamodel
@RequiresDialect({HSQLDialect.class, H2Dialect.class})
@FailureExpectedWithNewMetamodel
public void testComponentSubPropertyMapKey() throws Exception {