public function foreignKey($key = null)
    {
        deprecationWarning(
            get_called_class() . '::foreignKey() is deprecated. ' .
            'Use setForeignKey()/getForeignKey() instead.'
        );
        if ($key !== null) {
            $this->setForeignKey($key);
        }

        return $this->getForeignKey();
    }