I have the following query and it is working fine:
$cursor = Cursor::find() ->with('idJob') ->orderBy('job_start') ->one();
The question is:
How to pick only specific columns from related table ‘idJob’ rather than all in a purpose to optimize query?
In case of Yii v.1 it would be like this:
'with' => [ 'idJob' => [ 'select' => ['column1', 'column2'] ] ]
but I can’t find appropriate syntax in case of Yii v.2.