I have added a join ($criteria->join=‘LEFT JOIN Client ON Client.id=Invoice.clientId’; ) to the search() method in the Invoice Class so that in admin view I can display the relative Client name. However in doing this the value for Invoice.Id has been replaced by the value for Client.Id when viewed in ?r=invoice/admin. I have read through what may need to be changed in CGridView to overcome this but maybe I need to add an alias into the search method to distinguish between the two ids.
Can anyone shed any light on this? I don’t know how to add this alias or what the syntax/format should be.