[TYPO3-mvc] MM Relation with foreign tables (old exec_SELECT_mm_query())

Franz Koch typo3.RemoveForMessage at elements-net.de
Mon Apr 9 04:52:18 CEST 2012


Hey Claus,

> I try to use the tables from dam extension inside an extbase extension.
> There are three tables. My mapping to this :
> [...]
> persistence {
> classes {
...
> Tx_Dam_Domain_Model_DamMMCat {
> mapping {
> tableName = tx_dam_mm_cat
> }
> }
> }
> }
> [...]
>
> I create the Tx_Dam_Domain_Model_DamMMCat Model like this :
...
> I'd give it a try by calling
> $damFiles = $this->damMMCatRepository->findAll();
>
> But every object property have a null value.
> It seems like that there is the operation JOIN missing.
>
> Is it possible at all to use this kind of table construct in extbase ?

Why are you actually using a separate model for the MM records and not 
just directly map your categories with your dam records? Extbase does 
support MM relations - no need to go the "IRRE" way and use the MM table 
as intermediate object - really no need for that!
This will also eliminate the second query you mentioned.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list