mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 00:24:57 +00:00
HHH-7387 - Integrate Draft 6 of the JPA 2.1 spec
This commit is contained in:
parent
3edb72db48
commit
1dd3e3a0bc
@ -334,7 +334,9 @@ public <T> T unwrap(Class<T> cls) {
|
|||||||
if ( RegionFactory.class.isAssignableFrom( cls ) ) {
|
if ( RegionFactory.class.isAssignableFrom( cls ) ) {
|
||||||
return (T) sessionFactory.getSettings().getRegionFactory();
|
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() );
|
throw new PersistenceException( "Hibernate cannot unwrap Cache as " + cls.getName() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user