Overview
Widget Many To Many
Widget for many-to-many relationships based on column mc_ui_column_type = "multiple_check".
Screenshot Reference (User Manual)
manual__manytomany__01.png: many-to-many widget metadata configuration.manual__manytomany__02.png: runtime example of the many-to-many widget in grid/edit.
Main Column Metadata
mc_ui_column_type: must bemultiple_check.mc_ui_grid_is_multiple_check: enables multi-selection behavior in the lookup editor.mc_ui_grid_route: metadata route of the lookup table (related entity).mc_ui_grid_display_field: descriptive field shown in the selector and grid.mc_ui_grid_related_id_field: ID field of the related record.
Many-to-Many Specific Column Metadata
mc_ui_grid_manytomany_route: metadata route of the many-to-many bridge table.mc_ui_grid_manytomany_local_id_field: FK field toward the local entity in the bridge table.mc_ui_grid_manytomany_related_id_field: FK field toward the related entity in the bridge table.mc_ui_grid_local_id_field: local table ID field used to bind the selection.
Runtime Behavior
- In edit/detail, the widget uses multiple selection with remote lookup.
- In list/grid, the value is rendered as a description list (join on
mc_ui_grid_display_field). - On save, the framework synchronizes the many-to-many relationship using local/related keys defined in the metadata.
Operational Notes
- Verify that
mc_ui_grid_routeandmc_ui_grid_manytomany_routeare valid metadata routes. - Verify consistency between
*_local_id_fieldand*_related_id_fieldfields with the SQL schema of the bridge table.
Screenshot

