[TYPO3-dev] Complex mm-relations

Ingmar Schlecht ingmar at typo3.org
Wed Jun 3 23:26:28 CEST 2009


Hi Steffen,

I think your configuration should work.

So which query in t3lib_loaddbgroup goes wrong?

cheers
Ingmar


Steffen Kamper schrieb:
> Hi Joey,
> 
> JoH asenau schrieb:
>>> i have a master table having 4 mm-relation fields in. All share one
>>> mm-table.
>>>
>>> Now when building queries, i recognized that the mm-query doesn't work
>>> with this configuration: it doesn't use "tablenames" field in
>>> mm-table, so even if i use it for one-field-relation i get wrong
>>> results.
>>
>> How do you build the queries?
>> Using lots of mm_relations to different tables didn't seem to be a
>> problem
>> for me so far, since we are using it quite often within the tagpack
>> extension.
>>
> 
> i try to use the API when ever possible. But this seems to be impossible
> here. Do you use different mm-table for each relation?
> 
> I have this situation (except from master table):
> 
> 'category' => array (       
>             'exclude' => 0,       
>             'label' =>
> 'LLL:EXT:mfc_editionsprojekte/locallang_db.xml:tx_mfceditionsprojekte_projects.category',
>     
>             'config' => array (
>                 'type' => 'select',
>                 'form_type' => 'user',
>                 'userFunc' =>
> 'tx_mfceditionsprojekte_treeview->displayCategoryTree',
>                 'treeView' => 1,
>                 'foreign_table' => 'tx_mfceditionsprojekte_category',
>                 'size' => 5,
>                 'minitems' => 0,
>                 'maxitems' => 500,
>                 'MM' => 'tx_mfceditionsprojekte_relations_mm',
>                 'MM_match_fields' => array('tablenames' =>
> 'tx_mfceditionsprojekte_category'),
>                 'neg_foreign_table' => 'tx_mfceditionsprojekte_category',
>             )
>         ),
>         'genre' => array (       
>             'exclude' => 0,       
>             'label' =>
> 'LLL:EXT:mfc_editionsprojekte/locallang_db.xml:tx_mfceditionsprojekte_projects.genre',
>     
>             'config' => array (
>                 'type' => 'select',
>                 'form_type' => 'user',
>                 'userFunc' =>
> 'tx_mfceditionsprojekte_treeview->displayCategoryTree',
>                 'treeView' => 1,
>                 'foreign_table' => 'tx_mfceditionsprojekte_genre',
>                 'size' => 5,
>                 'minitems' => 0,
>                 'maxitems' => 500,
>                 'MM' => 'tx_mfceditionsprojekte_relations_mm',
>                 'MM_match_fields' => array('tablenames' =>
> 'tx_mfceditionsprojekte_genre'),
>                 'neg_foreign_table' => 'tx_mfceditionsprojekte_genre',
>             )
>         ),
>         'technique' => array (       
>             'exclude' => 0,       
>             'label' =>
> 'LLL:EXT:mfc_editionsprojekte/locallang_db.xml:tx_mfceditionsprojekte_projects.technique',
>     
>             'config' => array (
>                 'type' => 'select',
>                 'form_type' => 'user',
>                 'userFunc' =>
> 'tx_mfceditionsprojekte_treeview->displayCategoryTree',
>                 'treeView' => 1,
>                 'foreign_table' => 'tx_mfceditionsprojekte_technique',
>                 'size' => 5,
>                 'minitems' => 0,
>                 'maxitems' => 500,
>                 'MM' => 'tx_mfceditionsprojekte_relations_mm',
>                 'MM_match_fields' => array('tablenames' =>
> 'tx_mfceditionsprojekte_technique'),
>                 'neg_foreign_table' => 'tx_mfceditionsprojekte_technique',
>             )
>         ),
>         'output' => array (       
>             'exclude' => 0,       
>             'label' =>
> 'LLL:EXT:mfc_editionsprojekte/locallang_db.xml:tx_mfceditionsprojekte_projects.output',
>     
>             'config' => array (
>                 'type' => 'select',
>                 'form_type' => 'user',
>                 'userFunc' =>
> 'tx_mfceditionsprojekte_treeview->displayCategoryTree',
>                 'treeView' => 1,
>                 'foreign_table' => 'tx_mfceditionsprojekte_output',
>                 'size' => 5,
>                 'minitems' => 0,
>                 'maxitems' => 500,
>                 'MM' => 'tx_mfceditionsprojekte_relations_mm',
>                 'MM_match_fields' => array('tablenames' =>
> 'tx_mfceditionsprojekte_output'),
>                 'neg_foreign_table' => 'tx_mfceditionsprojekte_output',
>             )
>         ),
> 
> vg Steffen




More information about the TYPO3-dev mailing list