HHH-7387 - Integrate Draft 6 of the JPA 2.1 spec

This commit is contained in:
Steve Ebersole 2012-06-21 09:38:37 -05:00
parent 3edb72db48
commit 1dd3e3a0bc
1 changed files with 3 additions and 1 deletions

View File

@ -334,7 +334,9 @@ public class EntityManagerFactoryImpl implements HibernateEntityManagerFactory {
if ( RegionFactory.class.isAssignableFrom( cls ) ) {
return (T) sessionFactory.getSettings().getRegionFactory();
}
if ( org.hibernate.Cache.class.isAssignableFrom( cls ) ) {
return (T) sessionFactory.getCache();
}
throw new PersistenceException( "Hibernate cannot unwrap Cache as " + cls.getName() );
}
}