public function duplicate() {
        $this->isNewRecord = true;

        foreach ($this->primaryKey() as $key) {
                    $this->$key = null;
        }

        if ($this->save()) {
            return $this;
        }
        return null;
    }