/**
  * @return \yii\db\ActiveQuery
  */
 public function getPurse()
 {
     /**
      * @var ActiveRecord $this
      */
     return $this->hasOne(Purse::className(), ['owner_id' => 'id'])->onCondition('owner_type = :type', [':type' => self::purseOwnerType()]);
 }
Beispiel #2
0
 /**
  * @return \yii\db\ActiveQueryInterface
  */
 public function getPurse()
 {
     return $this->hasOne(Purse::className(), ['id' => 'purse_id']);
 }