Is there anything built into Yii2 AR or a plugin that can help with the following situation.
I have a table that holds a record and another table that inserts meta data.
Table
part_topic
- id
- more stuff
...
part_topic_item
- id
- part_topic_id_fk
- name
- value
So I’d have 1 row referring to the part_topic and multiple part_topic_item rows. These would be entered off the same form most likely.
My current solution has been to just create the part_topic and then forloop the inputs and manually create a new part_topic_item model, set the part_topic_item_id_fk with newly created part_topic’s id and save a new part_topic_item model.
Is there a better alternative?