HHH-8477 use unwrapped query
This commit is contained in:
parent
a1e3849e5d
commit
381198c206
|
@ -401,7 +401,7 @@ public class EntityManagerFactoryImpl implements HibernateEntityManagerFactory {
|
||||||
final HibernateQuery unwrapped = query.unwrap( HibernateQuery.class );
|
final HibernateQuery unwrapped = query.unwrap( HibernateQuery.class );
|
||||||
if ( unwrapped != null ) {
|
if ( unwrapped != null ) {
|
||||||
// create and register the proper NamedQueryDefinition...
|
// create and register the proper NamedQueryDefinition...
|
||||||
final org.hibernate.Query hibernateQuery = ( (HibernateQuery) query ).getHibernateQuery();
|
final org.hibernate.Query hibernateQuery = unwrapped.getHibernateQuery();
|
||||||
if ( org.hibernate.SQLQuery.class.isInstance( hibernateQuery ) ) {
|
if ( org.hibernate.SQLQuery.class.isInstance( hibernateQuery ) ) {
|
||||||
sessionFactory.registerNamedSQLQueryDefinition(
|
sessionFactory.registerNamedSQLQueryDefinition(
|
||||||
name,
|
name,
|
||||||
|
|
Loading…
Reference in New Issue