You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.
It would be nice if the behavior would allow to pass and save/update such additional columns in the junction table utilizing this native Yii2 method.
For example it could be made with declaring a callback in the behavior configuration that returns an array of the junction table column values for each ActiveRecord instance being saved,
…l of all rows in a junction table representing the initial state of a many-to-many relation.
This mode is automatically used if junction table properties are configured for the relation, ensuring that junction table properties are saved even if the related model properties did not change.
feature la-haute-societe#15
sspat
added a commit
to sspat/yii2-save-relations-behavior
that referenced
this issue
Jun 9, 2017
Currently it the behavior code it is hard coded that the yii\db\BaseActiveRecord->link method is called without a possible third parameter.
The third parameter is used for passing additional columns data to be saved to the junction table in a many-to-many relationship through a junction table.
http://www.yiiframework.com/doc-2.0/yii-db-baseactiverecord.html#link()-detail
It would be nice if the behavior would allow to pass and save/update such additional columns in the junction table utilizing this native Yii2 method.
For example it could be made with declaring a callback in the behavior configuration that returns an array of the junction table column values for each ActiveRecord instance being saved,
An example:
The text was updated successfully, but these errors were encountered: