I have my models setup as a many-to-many using through with a pivot table. However, I would like to add some extra data into the pivot table.
In the past (kohana 3.0) I was able to provide extra data with the add method
$obj->add('alias', $related, array('extra'=>'data'))
But its seems in Kohana 3.3 that the add method does not provide the third parameter for extra data, and I cannot seem to find how to do this short of after saving, adding more data then re-saving.
This isn’t supported anymore since
Kohana 3.1.The reason they removed it (Source: http://dev.kohanaframework.org/issues/3754):
You now have to make a model for the pivot table and place the additional information in that model.
Then instead of using
has_many "through" (n:n)you should usehas_many (1:n)relationship for both tables to the pivot table.I hope this answers your question.