private function updateRegistries($entities, $from)
    {
        if (count($entities) >= 0) {
            for ($j = $from; $j >= 0; $j--) {
                /** @var RegistryInterface $registry */
                $registry = $this->registries[ $j ];
                /** @var AbstractEntity $entity */
                foreach ($entities as $entity) {
                    $registry->add($entity->getId(), $entity);
                }
            }
        }
    }