public function copy($save = false)
    {
        $object_class = get_class($this);

        /** @var EntityInterface $copy */
        $copy = new $object_class($this->connection, $this->pool, $this->log);

        foreach ($this->getFields() as $field) {
            if ($this->isPrimaryKey($field)) {
                continue;
            }

            $copy->setFieldValue($field, $this->getFieldValue($field));
        }

        if ($save) {
            $copy->save();
        }

        return $copy;
    }