Merge from ../../trunk. svn merge -c 633739 ../../trunk

git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/1.0.x@633744 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Patrick Linskey 2008-03-05 01:29:56 +00:00
parent 3351b0c4a4
commit f22c0c799f
1 changed files with 8 additions and 3 deletions

View File

@ -128,6 +128,9 @@ public class QueryCacheStoreQuery
// using it because of the individual by-oid lookups
ClassMetaData meta = _repos.getMetaData(getContext().
getCandidateType(), _sctx.getClassLoader(), true);
if (meta.getDataCache() == null)
return null;
BitSet idxs = meta.getDataCache().containsAll(res);
// eventually we should optimize this to figure out how many objects
@ -333,9 +336,11 @@ public class QueryCacheStoreQuery
(q.getContext(), classes));
// evict from the data cache
for (int i = 0; i < cmd.length; i++)
cmd[i].getDataCache().removeAll(
cmd[i].getDescribedType(), true);
for (int i = 0; i < cmd.length; i++) {
if (cmd[i].getDataCache() != null)
cmd[i].getDataCache().removeAll(
cmd[i].getDescribedType(), true);
}
}
public Number executeDelete(StoreQuery q, Object[] params) {