I have a many to many bridge table which contains some extra fields other the the pks of the two parent tables. How can I update this table using AR records?
My table structure has the following columns,
categoryid (fk from category table)
productid (fk from product table)
As this is a many to many bridge table, categoryid and productid are the composite primary key. Otherfields* are some extra information i need to store.
Is there any way I can handle this with AR records? or any extensions?
Thanks in advance.
Solution is to create a model for this bridge table and use it.
can you please give an idea how to do this? Thanks you for all your help.
Thanks for your solution, but before to implement I see a problem.
What does it happen, if we want to create a object, from a unique "create view", with information of two models (model parent and model joined).
How do we do to call the render with only one model?
'model' => $model,
'buttons' => 'create'));
There is only the possibility of creating a shared model?