/** * @return \yii\db\ActiveQuery */ public function getIdCharacteristic0() { return $this->hasOne(CharacteristicModel::className(), ['id' => 'idCharacteristic']); }
/** * @return \yii\db\ActiveQuery */ public function getCharacteristics() { return $this->hasMany(CharacteristicModel::className(), ['idCategory' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getIdCharacteristics() { return $this->hasMany(CharacteristicModel::className(), ['id' => 'idCharacteristic'])->viaTable('{characteristic_value}', ['idProduct' => 'id']); }