Ejemplo n.º 1
0
 /**
  * @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()]);
 }
Ejemplo n.º 2
0
 /**
  * @return \yii\db\ActiveQueryInterface
  */
 public function getPurse()
 {
     return $this->hasOne(Purse::className(), ['id' => 'purse_id']);
 }