[TYPO3-mvc] MM Tables, sorting, performance, objectStorage

Michael Knoll mimi at kaktusteam.de
Tue Jan 5 03:37:16 CET 2010


Hi there,

following some posts on IRRE, I was wondering, whether there is a 
problem with transfering Typo3 concepts of MM relation handling into 
ExtBase.

I have the following problem in my gallery extension: An album contains 
images which are ordered by using the "sorting" attribute of the MM 
relation that puts images into albums. This field (sorting) is used by 
T3 backend to handle such stuff as sorting in MM relations. So it's an 
attributed relation - I would at least call it like that.

If I get you right, ExtBase does not support this relation type at the 
moment, but only plain MM relation tables (foreign_id <-> local_id).

So I could use a data modell looking like this:

album  <-1:n-> album_content  <-n:1-> image
=====          =============          ========
id             id                     id
                image_id
                album_id
                sorting


Here, "album_content" is no longer a T3 MM relation table, but a domain 
object table. But this kind of relation and sorting is no longer 
editable in a comfortable way in T3 backend - am I right?

Another question I have, is whether object storage can handle the 
sorting of objects in its structure. Lets say, an album has images with 
the following IDs in exactly this order: (1,10,8,9,7...) and I load them 
with standard Extbase MM relation resolving mechanisms into my album 
object. What will happen, if I do a foreach on the objectStorage object? 
And how can I achieve a change of order inside the object storage 
object? Are there any out-of-the box solutions to this or do I have to 
implement it my own?

I hope, my questions are clearly formulated and thank you for any 
answers on that.

Michael

By the way: It hasn't been said enough: ExtBase really rocks. Never 
before I had been that fast in implementing PHP Applications! So you 
really did a good job and I hope we fix the last parts on it as well as 
you did with the other parts before! Thanks a lot!


More information about the TYPO3-project-typo3v4mvc mailing list