I’ve got this Event object in database, which has a EventType attribute.
In Database, I represent this by a separate EventType master table which contains all types (this is a static table), and a foreign key in the Event table.
I used gii to generate the model and CRUD forms, including relations.
I then followed the REST api controller tutorial here.
My question is, I want my REST list and view actions to return all data from Event, but instead of returning the idEventType attribute, I want the actual EventType attributes (namely a description and a numeric code) to be returned, as though both objects would merge.
How would you do that?