public function add($instance)
    {
        $class = get_class($instance);
        $entityPool = $this->pool[$class] ?? [];
        $entityPool[$instance->id] = $instance;
        $this->pool[$class] = $entityPool;

        return $instance;
    }