This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hi, I've setup a BelongsToMany relation, with Pivot, between model A and model B and I using the RelationController on the backend edit form (Controller) for model A. The relation works properly, the relation list shows the model B records linked to the model A record and shows the pivot data correctly. Clicking on the Add 'Relation' button properly shows the popup with the list of model B records. Clicking on one of these properly shows the popup to enter the Pivot data. Once done, returns to the model A form where the relation list is updated with the appropriate new model B record and its pivot data.
Clicking on the Create button properly brings up the popup with model B's form and a model B record is properly created when click Create in popup. So far so good. Here, I would expect to get the popup to enter the Pivot data. This does not happen. Returns to the model A form where the relation list is properly update but without the pivot data.
Anyone else see this behavior with BelongsToMany with pivot relations ? If not, then perhaps I've not configured properly. If so, the is there a programming issue ?
Here is the config_relation.yaml for model A's controller: theRelation: label: TheRelation view: list: @/plugins/udem/assets/models/modelB/columnsWithPivot.yaml manage: list: @/plugins/udem/assets/models/modelB/columns.yaml form: @/plugins/udem/assets/models/modelB/fields.yaml pivot: form: fields: pivot[theRelation]: label: TheRelation type: text
Thanks.
1-1 of 1