i want to filter data with related data like in this link.
when i tried the above url it shows error Calling unknown method: yii\mongodb\ActiveQuery::joinWith()
how i can filter data with related data using yii2-mongodb.
please help me…
i want to filter data with related data like in this link.
when i tried the above url it shows error Calling unknown method: yii\mongodb\ActiveQuery::joinWith()
how i can filter data with related data using yii2-mongodb.
please help me…
Unfortunately, you can’t do it.
In order to soft/filter by a related model’s attribute, you have to join the related table to that of the main model. This can only be achieved between the models based on the relational db tables.
http://www.yiiframework.com/doc-2.0/guide-db-active-record.html#joining-with-relations
Displaying the related model will work as expected, though.