diff --git a/hibernate-core/src/test/java/org/hibernate/test/jpa/proxy/JPAProxyTest.java b/hibernate-core/src/test/java/org/hibernate/test/jpa/proxy/JPAProxyTest.java index eb27d85f46..d03bc50fe1 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/jpa/proxy/JPAProxyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/jpa/proxy/JPAProxyTest.java @@ -33,7 +33,6 @@ import org.hibernate.Session; import org.hibernate.Transaction; import org.hibernate.test.jpa.AbstractJPATest; import org.hibernate.test.jpa.Item; -import org.hibernate.testing.FailureExpectedWithNewMetamodel; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; @@ -45,7 +44,6 @@ import static org.junit.Assert.fail; * * @author Steve Ebersole */ -@FailureExpectedWithNewMetamodel public class JPAProxyTest extends AbstractJPATest { @Test public void testEjb3ProxyUsage() { diff --git a/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BaseCoreFunctionalTestCase.java b/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BaseCoreFunctionalTestCase.java index 574e954b24..ddbcd9c009 100644 --- a/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BaseCoreFunctionalTestCase.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/junit4/BaseCoreFunctionalTestCase.java @@ -62,6 +62,7 @@ import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.Property; import org.hibernate.mapping.SimpleValue; import org.hibernate.metamodel.MetadataSources; +import org.hibernate.metamodel.SessionFactoryBuilder; import org.hibernate.metamodel.spi.MetadataImplementor; import org.hibernate.metamodel.spi.binding.AbstractPluralAttributeBinding; import org.hibernate.metamodel.spi.binding.AttributeBinding; @@ -163,7 +164,11 @@ public abstract class BaseCoreFunctionalTestCase extends BaseUnitTestCase { metadataImplementor = buildMetadata( bootRegistry, serviceRegistry ); afterConstructAndConfigureMetadata( metadataImplementor ); applyCacheSettings(metadataImplementor); - sessionFactory = ( SessionFactoryImplementor ) metadataImplementor.buildSessionFactory(); + SessionFactoryBuilder sessionFactoryBuilder = metadataImplementor.getSessionFactoryBuilder(); + if(configuration.getEntityNotFoundDelegate()!=null){ + sessionFactoryBuilder.with( configuration.getEntityNotFoundDelegate() ); + } + sessionFactory = ( SessionFactoryImplementor )sessionFactoryBuilder.build(); } else { // this is done here because Configuration does not currently support 4.0 xsd