/** * @return \yii\db\ActiveQuery */ public function getOperations() { return $this->hasMany(Operation::className(), ['resource_id' => 'resource_id']); }
/** * @return \yii\db\ActiveQuery */ public function getOperation() { return $this->hasOne(Operation::className(), ['id' => 'operation_id']); }
/** * @return \yii\db\ActiveQuery */ public function getOperations() { return $this->hasMany(Operation::className(), ['id' => 'operation'])->viaTable('{{%operation_category_join}}', ['category' => 'id']); }