Ejemplo n.º 1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRelative()
 {
     if ($this->relative_id != null) {
         $result = $this->hasOne(Relatives::className(), ['id' => 'relative_id']);
     } else {
         return $this->hasOne(Relatives::className(), ['id' => 'relative_id']);
     }
 }
Ejemplo n.º 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getHusband()
 {
     return $this->hasOne(Relatives::className(), ['id' => 'husband_id']);
 }
Ejemplo n.º 3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRelative()
 {
     return $this->hasOne(Relatives::className(), ['id' => 'relative_id']);
 }