queryOptions.setCloneResults(true);

Dear community,

I have a question why is need to add
queryOptions.setCloneResults(true);

in this rule?

It will clone the results set from the initial context.search() returned iterator and will allow the set to be iterated over even after a commitTransaction() has been called on the identities. For more information, go through the below link.

https://community.sailpoint.com/t5/IdentityIQ-Articles/IdentityIQ-8-0-and-commitTransaction-while-using-an-iterator/ta-p/143225

2 Likes

Hi @fugitiva ,

The newer version of Hibernate used by IIQ 8.0 and above closes the record set of the iterator loop during a commit transaction. As a work around, the setCloneResults method clones the query result to the memory and will allow us to iterate over the results even after a commit.

Refer this article for more in depth details : IdentityIQ 8.0 and commitTransaction while using an iterator - Compass (sailpoint.com)

I missed @MVKR7T reply :sweat_smile:.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.