Exemplo n.º 1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVidmageAuthors()
 {
     return $this->hasMany(\common\models\VidmageAuthor::className(), ['author_id' => 'id']);
 }
Exemplo n.º 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getMainAuthor()
 {
     return $this->hasOne(\common\models\VidmageAuthor::className(), ['vidmage_id' => 'id'])->where(['is_main_author' => true]);
 }