Use the otherKey to update a relation
If the `otherKey` of the relationship was set, the widget was considering the wrong column name.
This commit is contained in:
parent
35296c5b26
commit
01193511d5
|
|
@ -140,8 +140,8 @@ class Relation extends FormWidgetBase
|
|||
}
|
||||
|
||||
$field->options = $usesTree
|
||||
? $result->listsNested($nameFrom, $relationModel->getKeyName())
|
||||
: $result->lists($nameFrom, $relationModel->getKeyName());
|
||||
? $result->listsNested($nameFrom, $relationObject->getOtherKey())
|
||||
: $result->lists($nameFrom, $relationObject->getOtherKey());
|
||||
|
||||
return $field;
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue