public function persist(object $entity): self
    {
        $identity = $this->extractIdentity($entity);

        if (!$this->container->contains($identity)) {
            $meta = ($this->metadata)(get_class($entity));
            $this->container->push(
                $identity,
                $entity,
                State::new()
            );
            $this
                ->generators
                ->get($meta->identity()->type())
                ->add($identity);
        }

        return $this;
    }