When building a relationship Belongs to Many with Pivot Data the lack of a table name causes an sql ambiguous ID error.
This commit is contained in:
parent
8cdb24c40a
commit
90d5bde28c
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue