parent
77a494d3be
commit
137a2bf0e9
2 changed files with 0 additions and 7 deletions
|
@ -221,11 +221,8 @@ public class JpaUtils {
|
||||||
SessionFactoryImplementor sessionFactory = entityManager.getEntityManagerFactory().unwrap(SessionFactoryImplementor.class);
|
SessionFactoryImplementor sessionFactory = entityManager.getEntityManagerFactory().unwrap(SessionFactoryImplementor.class);
|
||||||
|
|
||||||
if (isNative) {
|
if (isNative) {
|
||||||
// NativeSQLQuerySpecification spec = new NativeSQLQuerySpecification(querySql, new NativeSQLQueryReturn[0], Collections.emptySet());
|
|
||||||
// sessionFactory.getQueryPlanCache().getNativeSQLQueryPlan(spec);
|
|
||||||
sessionFactory.addNamedQuery(queryName, entityManager.createNativeQuery(querySql));
|
sessionFactory.addNamedQuery(queryName, entityManager.createNativeQuery(querySql));
|
||||||
} else {
|
} else {
|
||||||
// sessionFactory.getQueryPlanCache().getHQLQueryPlan(querySql, false, Collections.emptyMap());
|
|
||||||
sessionFactory.addNamedQuery(queryName, entityManager.createQuery(querySql));
|
sessionFactory.addNamedQuery(queryName, entityManager.createQuery(querySql));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,12 +147,8 @@ public class JpaMapUtils {
|
||||||
SessionFactoryImplementor sessionFactory = entityManager.getEntityManagerFactory().unwrap(SessionFactoryImplementor.class);
|
SessionFactoryImplementor sessionFactory = entityManager.getEntityManagerFactory().unwrap(SessionFactoryImplementor.class);
|
||||||
|
|
||||||
if (isNative) {
|
if (isNative) {
|
||||||
// deprecation notes mention usage of a new QueryEngine in hibernate 6
|
|
||||||
// NativeSQLQuerySpecification spec = new NativeSQLQuerySpecification(querySql, new NativeSQLQueryReturn[0], Collections.emptySet());
|
|
||||||
// sessionFactory.getQueryPlanCache().getNativeSQLQueryPlan(spec);
|
|
||||||
sessionFactory.addNamedQuery(queryName, entityManager.createNativeQuery(querySql));
|
sessionFactory.addNamedQuery(queryName, entityManager.createNativeQuery(querySql));
|
||||||
} else {
|
} else {
|
||||||
// sessionFactory.getQueryPlanCache().getHQLQueryPlan(querySql, false, Collections.emptyMap());
|
|
||||||
sessionFactory.addNamedQuery(queryName, entityManager.createQuery(querySql));
|
sessionFactory.addNamedQuery(queryName, entityManager.createQuery(querySql));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue