I have a situation I wonder how to solve in Yii the best way. My scenario is this:
I have a form collecting data that will go into two (or more) db-tables.
As i understand, each AR is only for one db-table, so how would I solve this case?
I have thought out this possible solution, but would like comments before i pursue it further:
- Make a model that extends CFormModel and has all the elements in my form. Then make a controller that uses sql queries to access the two different db-tables (or should I in the controller access two AR instead of sql?)
Quote
Because of this text from the docs, something tells me I should make one AR for two db-tables, but doesnt that go against definition? …hmm