Hello everyone, I’m having a little trouble trying to dispĺay a field from a table that is not directly related to the one I’m working in.
So far I’ve managed to display different fields on the GridView using joinWith but from direct relations (following this great guide: Displaying, Sorting and Filtering Model Relations on a GridView)
I have 3 tables: “dosisxreceta”, “dosis” and “insumo”. In the “dosisxreceta” there’s a FK to “dosis”, and “dosis” has a FK referencing to “insumo” table, what I want to do is to display the “nombre_insumo” field in the “dosisxreceta” index (instead of the actual “id_dosis” which is the direct relation between “dosisxreceta” and “dosis” tables).
I’m attaching a pic of the model hoping it helps to clarify things.