Skip to content

Commit 34a361a

Browse files
committed
make stable cache key for update calls cache
1 parent 4d26b71 commit 34a361a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/queries/ExpressionQueryMechanism.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1774,7 +1774,8 @@ public void prepareUpdateObject() {
17741774
boolean useCache = (row == null || !(getQuery().shouldValidateUpdateCallCacheUse() && row.hasNullValueInFields()));
17751775

17761776
// PERF: Check the descriptor update SQL call cache for a matching update with the same fields.
1777-
Vector updateCalls = getDescriptor().getQueryManager().getCachedUpdateCalls(getModifyRow().getFields());
1777+
final Vector<DatabaseField> updateCallsKey = org.eclipse.persistence.internal.helper.NonSynchronizedVector.newInstance(getModifyRow().getFields());
1778+
Vector updateCalls = getDescriptor().getQueryManager().getCachedUpdateCalls(updateCallsKey);
17781779
// If the calls were cached then don't need to prepare.
17791780
if (updateCalls != null && useCache == true) {
17801781
int updateCallsSize = updateCalls.size();
@@ -1819,7 +1820,7 @@ public void prepareUpdateObject() {
18191820
updateCalls.add(getCall());
18201821
}
18211822
}
1822-
getDescriptor().getQueryManager().putCachedUpdateCalls(getModifyRow().getFields(), updateCalls);
1823+
getDescriptor().getQueryManager().putCachedUpdateCalls(updateCallsKey, updateCalls);
18231824
}
18241825
}
18251826

0 commit comments

Comments
 (0)