[TYPO3-mvc] Work with many tables which all have the same structure

Stefan Frömken firma at sfroemken.de
Mon Sep 19 19:28:20 CEST 2011


Hello MVC-Team,

we have a huge database here which has many tables which all have the 
same structure. For this example each table with the customer-id as name 
contains all invoices for this customer.

You're right if you say: It's better to move all records in ONE huge 
table and don't seperate this. But this decision was made before my time.

For now I don't see any possibility to loop through all this tables and 
map them to ONE model. OK...I can create a model for each table, but 
what happens if a new customer will be created?

I tried really many things:
- In my loop I tried to change the TS-Mappings for my current Model. But 
this works only ONCE. After that, the Level1-Cache don't allows me to 
remapp this Model to another model.
- I tried to work with Modelnames which are not defined. But there is a 
method which checks a Modelname against PHP function class_exists().
- I tried to build my own QueryManager and Query.

How can I access tables with Fluid without having a model foreach table?

And ideas?

Stefan


More information about the TYPO3-project-typo3v4mvc mailing list