[TYPO3-english] Correct use of tablenames field in mm tables

Dmitry Dulepov dmitry.dulepov at gmail.com
Mon Jun 20 15:43:46 CEST 2011


Hi!

Guillermo R. Oramas J. wrote:
> Could you explain a bit in depth this?:
>
>> You can do it like this but it would be better to have separate mm tables in this case. You have three tables that you need to relate. That is best done through two separate tables.

Well, you have three regular tables. Two of them are related to one table. 
There is no point to use a single MM relation table in such case because it 
only adds complexity.

Here is what you should have:

Table2 == uses ==> table2_table1_mm ==> Table1
Table3 == uses ==> table3_table1_mm ==> Table2

And no 'tablenames' column in use.

>> Depends on your TCA configuration.

It is best if you read about MM relations in the TYPO3 core API doc. It 
describes MM relations well. It would be too much text here to describe it. 
Here is the link for you:
http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.3.0/view/4/2/#id2522688

Look down the page from that point.

-- 
Dmitry "itoldyou" Dulepov
TYPO3 core&security team member
E-mail: dmitry.dulepov at typo3.org
Web: http://dmitry-dulepov.com/



More information about the TYPO3-english mailing list