Answer the question
In order to leave comments, you need to log in
How to find out the number of related objects?
class Test extends \CActiveRecord {<br>
public function relations() {<br>
return [<br>
'childs' => [self::HAS_MANY, 'Childs', 'parent_id', 'order' => 'childs.title'],<br>
];<br>
}<br>
}<br>
childs
? self::STAT
and copy-paste links, but I refuse to believe that such shit code can be the norm.Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question