mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
when building belongsToMany relationships in controllers, the lack of a table name
alias causes an sql ambigious Id error
This commit is contained in:
parent
3a7cc9f7aa
commit
c75df3a120
@ -414,7 +414,7 @@ class RelationController extends ControllerBehavior
|
||||
*/
|
||||
protected function findExistingRelationIds($checkIds = null)
|
||||
{
|
||||
$foreignKeyName = $this->relationModel->getKeyName();
|
||||
$foreignKeyName = $this->relationModel->table . '.' . $this->relationModel->getKeyName();
|
||||
|
||||
$results = $this->relationObject
|
||||
->getBaseQuery()
|
||||
@ -818,4 +818,4 @@ class RelationController extends ControllerBehavior
|
||||
return $this->sessionKey = FormHelper::getSessionKey();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user