From 9f766ac779d8933a188c12ee95ec7e5fd3834a24 Mon Sep 17 00:00:00 2001 From: Scilef Date: Tue, 25 May 2021 10:32:14 +0300 Subject: [PATCH] Fix #18637: Mentioned that relation can not be named "relation" --- docs/guide-ru/db-active-record.md | 1 + docs/guide/db-active-record.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/guide-ru/db-active-record.md b/docs/guide-ru/db-active-record.md index 615109ea48..06769adb8e 100644 --- a/docs/guide-ru/db-active-record.md +++ b/docs/guide-ru/db-active-record.md @@ -844,6 +844,7 @@ class Order extends ActiveRecord указывается сразу после указания самого класса Active Record. Вы видите, что `customer_id` - это свойство класса `Order`, а `id` - свойство класса `Customer`. +> Warning: Имя связи `relation` зарезервировано. Его использование приведёт к ошбике `ArgumentCountError`. ### Доступ к связным данным diff --git a/docs/guide/db-active-record.md b/docs/guide/db-active-record.md index e87cde3e57..79b140eb1f 100644 --- a/docs/guide/db-active-record.md +++ b/docs/guide/db-active-record.md @@ -859,6 +859,7 @@ While declaring a relation, you should specify the following information: Active Record directly next to it. You see there that `customer_id` is a property of `Order` and `id` is a property of `Customer`. +> Warning: Relation name `relation` is reserved. When used it will produce `ArgumentCountError`. ### Accessing Relational Data