Merge pull request #837 from carlos-arroyo/develop

When building a relationship Belongs to Many with Pivot Data the lack of...
This commit is contained in:
Samuel Georges 2014-12-17 19:28:00 +11:00
commit 90d553ce10
1 changed files with 1 additions and 1 deletions

View File

@ -604,7 +604,7 @@ class RelationController extends ControllerBehavior
/*
* Check for existing relation
*/
$foreignKeyName = $this->relationModel->getKeyName();
$foreignKeyName = $this->relationModel->getQualifiedKeyName();
$existing = $this->relationObject->where($foreignKeyName, $foreignId)->count();
if (!$existing) {