Can you move that to Doctrine\ORM\Cache\Persiters\CollectionPersister instead?