yii2-relation-trait icon indicating copy to clipboard operation
yii2-relation-trait copied to clipboard

Error : Too few arguments to function app\models\base\Penilaian::getPenilaianDetsWithParam(), 0 passed and exactly 1 expected

Open moysoft opened this issue 7 years ago • 0 comments

I have created a manual method for filtering relation data. But relation trait not supported this method with a parameter or how to send the parameter to this new method? Thank you.

public function getPenilaianDetsWithParam($kinerjaId)
    {
        return $this->hasMany(\app\models\PenilaianDet::className(), ['penilaian_id' => 'id'])->where('kinerja_id = :kinerjaId', [':kinerjaId' => $kinerjaId])
            ->orderBy('kinerja_id');
    }

moysoft avatar Dec 01 '17 22:12 moysoft