[TYPO3-mvc] TCA type "inline" - again

Martin Kutschker masi-no at spam-typo3.org
Mon Jan 4 20:14:59 CET 2010


Jochen Rau schrieb:
> Hi all.
> 
> On 01.01.10 23:03, Martin Kutschker wrote:
>> TCA type "inline" is fun when it comes to mapping the data. Let's
>> assume this data model.
>>
>>
>>     1     n       n     1
>> CD---------Track---------Recording
>> title      number        title
>> tracks     recording     artist
>> producer   CD
>>
>> In the TCA the tracks field of the CD is declared as inline. The CD
>> ExtBase model has a property
>> $tracks defined as Tx_Extbase_Persistence_ObjectStorage<Tx_Track>.
> 
> I had a brief discussion with Masi over Skype about this topic today. I
> hope I can clarify the things a little bit now.
> 
> The conception of IRRE dealing with intermediate tables is, to store
> domain data in a mm-table. The concept of Extbase is to treat mm-tables
> only as a technical solution to store relations. If you feel the need to
> store data in a relation table, there is (IMHO) always a misconception
> in the domain model.

My current view no is that there is a misconception what IRRE is. The main "selling point" for IRRE
is the ability to edit in a TCEform related records directly. In reality there is no new or extended
way to express a relation.

An IRRE configuration with an "intermediate table" is - as you pointed out - only a "shorthand" for
two 1:n relations. The reason for this kind of setup is IMHO only the ability to create and view the
records from the "intermediate table" within the form of the parent table. But... this intermediate
table is not a simple relation table. It's a table with a compound key, which defined the identity
of the model.

Maybe my example with CDs and its tracks is not great, but the tracks are "real" objects (models) in
may domain. In my setup I need IRRE with a "foreign_selector" field for convenient editing of CDs in
the BE.

Masi


More information about the TYPO3-project-typo3v4mvc mailing list