#82549Enable support for "real" 1:n relations
Description
Currently a true 1:n relation is only configurable as IRRE or with a MM table. It should be possible to configure that only with a foreign key field in the child table.
What you can do is this:
['parent_table']['columns']['children'] => [
'config' => [
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
'size' => 5,
'maxitems' => 20,
'foreign_table' => 'child_table',
'foreign_field' => 'parent_id'
]
]
But that would result in a comma separated list of UIDs in the children field of the parent, while it should result in all selected children having the UID of the parent in their parent_id field.
TCA documentation does not mention, that it is not possible except with comma separated UIDs in the parents field, which requires an appropriate column type…
It has to be handled if children which are already assigned to other parents should just be reassigned when selected for another parent or if they should only be selectable if they are not yet assigned. A configuration flag like onlyShowUnassigned = true/false would be fine…
Maybe since we have Doctrine now, this is not too hard to implement…?
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch
- Commit message
-
[FEATURE] Enable support for "real" 1:n relations Resolves: #82549 Releases: main