I use SqlDataProvider to get mysql data
‘SELECT * FROM tableA LEFT OUTER JOIN tableB ON tableA.client_id = tableB.id’
tableA and tableB has the same column ‘id’ and ‘code’
I found column ‘id’ and ‘code’ is null when i use var_dump($models) in SqlDataProvider’s method ‘prepareKeys’
I use SqlDataProvider as gridview provider, so i need use attribute as DataColumn, but i can’t get ‘id’ and ‘code’ column data
following method is useless too
‘SELECT * FROM tableA AS A LEFT OUTER JOIN tableB AS B ON A.client_id = B.id’