From 572d5934274a7f8961e12e3372f5f10f8cdff9d5 Mon Sep 17 00:00:00 2001 From: Pinaki Poddar Date: Fri, 12 Mar 2010 02:35:03 +0000 Subject: [PATCH] OPENJPA-1561: Cache criteria query git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@922123 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/openjpa/persistence/EntityManagerImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java index d280e137a..92a495c27 100644 --- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java +++ b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java @@ -1042,8 +1042,8 @@ public class EntityManagerImpl return newQueryImpl(kernelQuery); } - protected QueryImpl newQueryImpl(org.apache.openjpa.kernel.Query kernelQuery) { - return new QueryImpl(this, _ret, kernelQuery); + protected QueryImpl newQueryImpl(org.apache.openjpa.kernel.Query kernelQuery) { + return new QueryImpl(this, _ret, kernelQuery); } /** @@ -1565,7 +1565,7 @@ public class EntityManagerImpl org.apache.openjpa.kernel.Query kernelQuery =_broker.newQuery(CriteriaBuilderImpl.LANG_CRITERIA, criteriaQuery); - QueryImpl facadeQuery = newQueryImpl(kernelQuery); + QueryImpl facadeQuery = newQueryImpl(kernelQuery).setId(criteriaQuery.toString()); Set> params = criteriaQuery.getParameters(); for (ParameterExpression param : params) {