Fix #18637: Mentioned that relation can not be named "relation"

This commit is contained in:
Scilef
2021-05-25 10:32:14 +03:00
committed by GitHub
parent 4cb2dfef1a
commit 9f766ac779
2 changed files with 2 additions and 0 deletions

View File

@ -844,6 +844,7 @@ class Order extends ActiveRecord
указывается сразу после указания самого класса Active Record. Вы видите, что `customer_id` - это свойство класса указывается сразу после указания самого класса Active Record. Вы видите, что `customer_id` - это свойство класса
`Order`, а `id` - свойство класса `Customer`. `Order`, а `id` - свойство класса `Customer`.
> Warning: Имя связи `relation` зарезервировано. Его использование приведёт к ошбике `ArgumentCountError`.
### Доступ к связным данным <span id="accessing-relational-data"></span> ### Доступ к связным данным <span id="accessing-relational-data"></span>

View File

@ -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 Active Record directly next to it. You see there that `customer_id` is a property of `Order` and `id` is a property
of `Customer`. of `Customer`.
> Warning: Relation name `relation` is reserved. When used it will produce `ArgumentCountError`.
### Accessing Relational Data <span id="accessing-relational-data"></span> ### Accessing Relational Data <span id="accessing-relational-data"></span>