mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-20 04:09:04 +00:00
updated JPA 2.0 support to the final spec (supporting the "getCriteriaBuilder" method)
This commit is contained in:
+2
-2
@@ -154,8 +154,8 @@ public abstract class SharedEntityManagerCreator {
|
||||
// JPA 2.0: return EntityManagerFactory without creating an EntityManager.
|
||||
return this.targetFactory;
|
||||
}
|
||||
else if (method.getName().equals("getQueryBuilder") || method.getName().equals("getMetamodel")) {
|
||||
// JPA 2.0: return EntityManagerFactory's QueryBuilder/Metamodel (avoid creation of EntityManager)
|
||||
else if (method.getName().equals("getCriteriaBuilder") || method.getName().equals("getMetamodel")) {
|
||||
// JPA 2.0: return EntityManagerFactory's CriteriaBuilder/Metamodel (avoid creation of EntityManager)
|
||||
try {
|
||||
return EntityManagerFactory.class.getMethod(method.getName()).invoke(this.targetFactory);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user