Support for TCA fields of type "group" - allowes DAM support (has patch)
Hi, extbase currently doesn't support TCA fields of type "group" natively. A easy workaround currently is to additionally define a "foreign_table" in your columns configuration together with a MM relation of course (no comma separated lists).
But unfortunately this little trick doesn't work together with DAM relations and probably some other multicolumn relations, because DAM itself is not configuring all MM_match_fields (tablenames missing by default) and is letting TYPO3 do the job of filling in the correct 'tablenames' match fields in MM relations. This patch is a first attempt to do in extbase the same as TYPO3 does in the backend. So with this patch you get:
- native support of group fields (type: group, interal_type: db, allowed: onlyOneTableNameSoFar)
- handling of multi-table relations like the CORE of TYPO3 does (adding tablenames if needed)
With this patch applied, DAM relations will work by default.
What will not work:
Retrieving/persisting objects to multiple tables for a single db field (so more then one allowed relation table, like the RECORDS CType of TYPO3 is using). To support this, some major rework is needed I think, that should/could be done together with singleTableInheritance.
#2 Updated by Franz Koch almost 10 years ago
version 2 of the patch, adding enhanced compatibility for group fields and incorporating the changes (drop of the check for 'foreign_label') from #6232 - so with this patch #6232 is obsolete.
Patch #6233 should still apply correctly.
#13 Updated by Franz Koch almost 9 years ago
- File Issue_6249_TcaGroupSupport.diff View added
- Assignee set to Franz Koch
- % Done changed from 50 to 80
- test for correct behavior when adding/removing MM relations
- tests with MM_opposite_field configurations in read and write processes.
This patch still doesn't add support for multiTable relations, but is already providing the basics. The "only" thing missing is to find a way on how to map the objects correctly - writing should already work correctly (MM-relation wise).
#15 Updated by Franz Koch almost 9 years ago
- Target version changed from Extbase 1.3.0 to Extbase 1.4
- % Done changed from 80 to 70
I did some further tests and noticed some remaining issues that have to be addressed in order to get full group field support. The patch itself seems to work (besides of one bug I found), but extbase is missing other features that have to be implemented first in order to have it work correctly (like relation type BELONGS_TO_MANY as far as I have seen). So it won't make it into 1.3.0 - sorry.
#22 Updated by Thomas Deinhamer over 7 years ago
As far as I have experienced in a recent project
this does not work yet, so in my oppinion this is
still a relevant feature request.
So, not sure how up to date the patch is. I guess
it won't work with the current git master.
#26 Updated by Franz Koch about 7 years ago
AFAIK currently users still have to define a "foreign_table" in TCA in order to support fields of type "group". Also some special cases of the group type are not treated correctly. See attached patch v2 which should still be valid. It's unfortunately almost 3 years ago that I had this issue and debugged this issue for several hours.
#30 Updated by Franz Koch over 5 years ago
I highly doubt it'll apply easily on current version and I don't have the time to dig into Extbase internals for days again. I wrote this patch back when I was involved with Extbase development and knew my ways around in the persistence layer and everything, but now I'm out and I haven't been following the internal changes in the last year(s). So somebody else is probably better qualified.