diff --git a/modules/backend/behaviors/RelationController.php b/modules/backend/behaviors/RelationController.php index ab93d9289..aa683fd70 100644 --- a/modules/backend/behaviors/RelationController.php +++ b/modules/backend/behaviors/RelationController.php @@ -1011,7 +1011,7 @@ class RelationController extends ControllerBehavior */ if (in_array($this->relationType, ['hasOne', 'hasMany'])) { $newModel->setAttribute( - $this->relationObject->getPlainForeignKey(), + $this->relationObject->getForeignKeyName(), $this->relationObject->getParentKey() ); }