mdmsoft / yii2-ar-behaviors

BSD 3-Clause "New" or "Revised" License
18 stars 10 forks source link

Getting unknown property exception thrown. #4

Open soap opened 8 years ago

soap commented 8 years ago

When I use QueryScopeBahavior in my module's model class. I got the following error.

Getting unknown property: frontend\modules\product\models\ProductSearch::modelClass

In D:\yii2\soap\xorders\vendor\yiisoft\yii2\base\Component.php.

My environment is PHP5.5 and Yii2.0.9 Windows 10.

Any recommendation? Thanks in advance.

mdmunir commented 8 years ago

when you not using QueryScopeBahavior, is it going ok?

soap commented 8 years ago

Yes, it happen in the method hasMethod() of QueryScopeBehavior

mdmunir commented 8 years ago

QueryScopeBehavior only work for ActiveRecord.

soap commented 8 years ago

Yes, I know that. But ProductSearch is extended from Product which is inherited from ActiveRecord.

mdmunir commented 8 years ago

I mean ActiveQuery.