[TYPO3-mvc] IRRE foreign_selector ("associative entity")
Martin Kutschker
masi-no at spam-typo3.org
Sun Dec 27 12:46:22 CET 2009
Steffen Ritter schrieb:
> Martin Kutschker schrieb:
>> Hi!
>>
>> Are inline records with a "foreign_selector" (and no "MM") are
>> supported by ExtBase? If I'm not
>> mistaken this would be "associative entities".
>>
>> I want to store (recording of) songs and CDs. A recording and a CD are
>> entities. As I want to store
>> the track number of a recording on a CD, the number must be stored in
>> the relation. So with IRRE I
>> would use a "real" TCA table for the relation with two select fields
>> and a field for the track number.
>>
>> But what to to now with ExtBase? The associative entity has to be
>> persisted, but doesn't need to be
>> shown or manipulated on its own. I won't need a controller/view for
>> it. But how to add this entities
>> to the models of recoding and CD without a further MM table?
>
> As you say "real TCA" it is an real entity itself. It just has only to
> properties. TrackNum and Song and combined its a track
> So your CD should relate only tracks.
But doesn't expect ExtBase MM tables to relate two classes? In the described DB layout as supported
by IRRE there are none. I had a look at the data mapper, but I fear I don't understand it fully yet.
Masi
More information about the TYPO3-project-typo3v4mvc
mailing list