TheStoryCoder TheStoryCoder - 10 months ago 51
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 Source

If you have got relation set like:

public function getRelationName()

Relation name is relationName.