Exemplo n.º 1
0
 /**
  * [getSuperNotes description]
  * @return ActiveRecord
  */
 public function getSuperNotes()
 {
     // return $this->hasMany(SuperNoteProductRel::className(),['product_id'=>'id'])->viaTable(SuperNotes::className(),['id'=>'id']);
     // return $this->hasMany(SuperNoteProductRel::className(),['product_id'=>'id']);
     return $this->hasMany(SuperNotes::className(), ['id' => 'super_note_id'])->via('superNoteProductRels');
 }
Exemplo n.º 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getSuperNote()
 {
     return $this->hasOne(SuperNotes::className(), ['id' => 'super_note_id']);
 }