Skip to content
Snippets Groups Projects
Commit 3820d69d 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: 37895
parent ab4c5004
No related branches found
No related tags found
No related merge requests found
...@@ -279,12 +279,16 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty ...@@ -279,12 +279,16 @@ final class EntityPropertyTypeDAO extends AbstractDAO implements IEntityProperty
default: default:
throw new IllegalArgumentException(entityKind.toString()); throw new IllegalArgumentException(entityKind.toString());
} }
SQLQuery updateQuery = InQueryScroller<Long> updateQueryScroller = new InQueryScroller(entityIds, 1);
session.createSQLQuery( List<Long> partialEntityId;
"update " + entityTableName + " set modification_timestamp = :timestamp where id in :entityIds "); while ((partialEntityId = updateQueryScroller.next()) != null)
updateQuery.setTimestamp("timestamp", getTransactionTimeStamp()); {
updateQuery.setParameterList("entityIds", entityIds); SQLQuery updateQuery = session
updateQuery.executeUpdate(); .createSQLQuery("update " + entityTableName + " set modification_timestamp = :timestamp where id in :entityIds ");
updateQuery.setTimestamp("timestamp", getTransactionTimeStamp());
updateQuery.setParameterList("entityIds", partialEntityId);
updateQuery.executeUpdate();
}
return null; return null;
} }
}); });
......
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