public function unserialize($serialized)
    {
        $attributes = unserialize($serialized);

        $conn = Ioc::make(Pool::class)->getConnection();
        $db = $conn->defaultDatabase;
        $collectionObject = $conn->getRawConnection()->$db->{$attributes['collection']};

        foreach ($attributes as $key => $value) {
            $this->$key = $value;
        }

        $this->collection = $collectionObject;
    }