[TYPO3-dev] table joins and TCA

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Mon Mar 13 14:00:29 CET 2006


Stig N. Færch schrieb:
> 
> Wouldn't this be the suggested way to do it from a database viewpoint?

The problem with such a DB layout is that you cannot get details for all 
types with on select nicely. You can get easily the main data with a select 
on the main table. You can get main data and details for one type with s 
join. But you would have to do a giant outer join select if you need the 
details for all types.

So I recommend such a layout only for specific applications.

But as you've noticed the TCA only supports relations not "virtual records" 
as implied by your 1:1 relation of main and detail tables.

So why don't you use flexforms for your detail data? Flexform are great if 
you need soe extra fields and you set it up so that you have a datasource 
for each record type. Have a look at tt_content:pi_flexform to see how it's 
done.

Of course you cannot select on flexform data. All fields that must be part 
of a where clause must be real DB fields.

Masi




More information about the TYPO3-dev mailing list