在Yii2模型过滤器上获取未知属性错误

时间:2015-05-07 06:08:57

标签: php yii2

在yii2模型中进行连接并对其应用过滤器时,给我一个错误获取未知属性:common \ models \ Application ::

$filters=(object)json_decode($_GET['filters']);

$model = Application::find()
            ->distinct()
            ->join('LEFT JOIN', 
                   'profile_detail', 
                   'profile_detail.account_id = application.account_id')
            ->where(['post_id' => 62]);
$model->orFilterWhere(['like', 'profile_detail.institude_name', $filters->institude]);

return $model->all();

PS:在编写直接查询而不是模型时,它的工作正常。

0 个答案:

没有答案
相关问题