HHH-7679 : Source implementations should not determine default discriminator match value

This commit is contained in:
Gail Badner 2012-10-09 19:34:40 -07:00
parent d54fecefee
commit bbde363d89
2 changed files with 3 additions and 1 deletions

View File

@ -47,6 +47,7 @@ import org.hibernate.metamodel.spi.source.SimpleIdentifierSource;
import org.hibernate.metamodel.spi.source.SingularAttributeSource;
import org.hibernate.metamodel.spi.source.TableSource;
import org.hibernate.metamodel.spi.source.TableSpecificationSource;
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
import org.hibernate.testing.junit4.BaseUnitTestCase;
import static org.junit.Assert.assertEquals;
@ -62,6 +63,7 @@ public class AssertSourcesTest extends BaseUnitTestCase {
final StandardServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder().build() ;
@Test
@FailureExpectedWithNewMetamodel( jiraKey = "HHH-7679" )
public void testUserEntitySources() {
MetadataSources hbm = new MetadataSources( serviceRegistry );
hbm.addResource( getClass().getPackage().getName().replace( '.', '/' ) + "/User.hbm.xml" );

View File

@ -165,7 +165,7 @@ public class InheritanceBindingTest extends BaseAnnotationBindingTestCase {
EntityBinding subclassOfSubclassEntityBinding = getEntityBinding( SubclassOfSubclassOfSingleTableInheritance.class );
assertTrue( rootEntityBinding.isRoot() );
assertNull( rootEntityBinding.getDiscriminatorMatchValue() );
assertEquals( rootEntityBinding.getEntity().getName(), rootEntityBinding.getDiscriminatorMatchValue() );
assertNull( rootEntityBinding.getSuperEntityBinding() );
assertSame( rootEntityBinding, getRootEntityBinding( RootOfSingleTableInheritance.class ) );
assertTrue( rootEntityBinding.isPolymorphic() );