public function prepareDatabaseSave(RelatedField $field)
    {
        if ($this->pk) {
            throw new  ValueError(
                'Unsaved model instance %s '.
                'cannot be used in an ORM query.', $this
            );
        }
        $name = $field->relation->getRelatedField()->getAttrName();

        return $this->{$name};
    }