diff --git a/repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/RepositoryCache.java b/repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/RepositoryCache.java index 4f0d213fedf..cb1d8931ea2 100644 --- a/repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/RepositoryCache.java +++ b/repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/RepositoryCache.java @@ -147,8 +147,10 @@ public int countContainers(Class type, ObjectQuery //region --- ADD, MODIFY, DELETE and other modifications ------------------------------------------------------- + @NotNull @Override - public @NotNull String addObject(@NotNull PrismObject object, RepoAddOptions options, @NotNull OperationResult parentResult) + public String addObject(@NotNull PrismObject object, RepoAddOptions options, + @NotNull OperationResult parentResult) throws ObjectAlreadyExistsException, SchemaException { return modificationOpHandler.addObject(object, options, parentResult); } diff --git a/repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/PassReason.java b/repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/PassReason.java index 13a2f293081..0aa96620631 100644 --- a/repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/PassReason.java +++ b/repo/repo-cache/src/main/java/com/evolveum/midpoint/repo/cache/handlers/PassReason.java @@ -79,15 +79,31 @@ static PassReason determine(Collection> opt } GetOperationOptions cloned = selectorOptions.getOptions().clone(); + // Options considered harmful: + // - retrieve + // - resolve + // - resolveNames + // - raw (because of strange definition handling) + // - tolerateRawData (this is questionable, though) + // - relationalValueSearchQuery + // - distinct + // - attachDiagData + // - definitionProcessing + // - iterationMethod + // Eliminate harmless options + cloned.doNotDiscovery(null); + cloned.setForceRefresh(null); + cloned.setForceRetry(null); cloned.setAllowNotFound(null); cloned.setExecutionPhase(null); cloned.setReadOnly(null); cloned.setNoFetch(null); - cloned.setPointInTimeType(null); // This is not used by repository anyway. + cloned.setPointInTimeType(null); // This is not used by repository anyway. // We know the staleness is not zero, so caching is (in principle) allowed. // More detailed treatment of staleness is not yet available. cloned.setStaleness(null); + cloned.setErrorHandling(null); if (cloned.equals(GetOperationOptions.EMPTY)) { return null; }