Updated rewriteCriteria to transform arrays of IDs into ObjectIDs