diff --git a/src/Rel/BelongsTo.php b/src/Rel/BelongsTo.php index 3862213..152f2e7 100644 --- a/src/Rel/BelongsTo.php +++ b/src/Rel/BelongsTo.php @@ -53,7 +53,7 @@ public function getKey() */ public function getForeignKey() { - return $this->getConfig()->getPrimaryKey(); + return $this->getRepo()->getConfig()->getPrimaryKey(); } /**