TheStoryCoder TheStoryCoder - 1 month ago 6
PHP Question

Yii2: What is the relation name?

For the ActiveRecord, what is "the name of the relation" that is to be used in eg.

and
unlink()
- where is that defined?

UPDATE:
The documentation now includes an example - though it doesn't show exactly how the camel case name is converted - as the answer to this question does.

Answer

If you have got relation set like:

public function getRelationName()

Relation name is relationName.