public function preFlush(PreFlushEventArgs $args)
    {
        $entityManager = $args->getEntityManager();
        $scheduledInsertions = $entityManager
            ->getUnitOfWork()
            ->getScheduledEntityInsertions();

        $this
            ->categoryIntegrityFixer
            ->fixCategoriesIntegrityByArray($scheduledInsertions);
    }