Skip to content
Snippets Groups Projects
Commit c5d80acd authored by juanf's avatar juanf
Browse files

SSDM-4682 : bugix, openBIS empty trashcan breaks when num entities over 2-byte due to SQL IN

SVN: 37880
parent 1220ec3b
No related branches found
No related tags found
No related merge requests found
......@@ -1220,7 +1220,15 @@ final class DataDAO extends AbstractGenericEntityWithPropertiesDAO<DataPE> imple
final String query =
"select " + side1 + " from data_set_relationships where " + side2 + " in (:ids) and relationship_id = :type";
return findRelatedIds(query, dataSetIds, relationshipTypeId);
InQueryScroller<TechId> dataSetIdsScroller = new InQueryScroller<>(dataSetIds, 2);
List<TechId> partialDataSetIds = null;
Set<TechId> result = new HashSet<>();
while ((partialDataSetIds = dataSetIdsScroller.next()) != null)
{
Set<TechId> partialResult = findRelatedIds(query, partialDataSetIds, relationshipTypeId);
result.addAll(partialResult);
}
return result;
}
@SuppressWarnings("unchecked")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment