[TYPO3-mvc] Get repository object from table name

Franz Koch typo3.RemoveForMessage at elements-net.de
Thu Jan 27 10:54:26 CET 2011


Hey Thomas,

> Is there a way to get a repository for a table name?
>
> In detail I got a group/db record name like
> "tx_myext_domain_model_record_213" and I want to
> retrieve the record from this table with the id 213.
>
> Any idea how to handle that?

MultiTable relations are not yet supported by extbase. I was working on 
the TCA-type group support for 1.3.0. But because of it's complexity it 
didn't make it into 1.3.0.
Also, according to Jochens statement, extbase will never support 
multiTable group relations stored as comma separated lists, like in your 
example, only multiTable relations using a MM table. But maybe I find a 
way to also add support for this once the MM table relation stuff is 
working.

So for the time being you have to do this on your own, speaking extract 
the tableName and the uid from the string, resolve the correct 
repository based on the table name and then fetch it. Or switch to a MM 
table relation and wait for my patch - but don't ask me when it's ready 
for consumtion - the multiTable relation feature will be the last thing 
to be implemented for the group type support and the rest currently 
still needs some work.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list