[TYPO3-mvc] Definitive state of MM-relational-queries in Extbase

Mario Beiser mariobeiser at googlemail.com
Wed Apr 14 09:50:19 CEST 2010


In article <mailman.1.1271228851.32166.typo3-project-
typo3v4mvc at lists.typo3.org>, typo3.RemoveForMessage at elements-net.de 
says...
> 
> Hey,
> 
> > erm, normally one post belongs to just one blog and not to many. So this
> > is not m:m relation but 1:n. Just skip all this mm_table stuff, give
> > your post table a select (maxitems=1) field and your post model a post
> > property annotated Tx_YourExt_Domain_Model_Blog (NOT ObjectStorage).
> > Extbase will map the related blog object into your post model and you
> > cann access it via {post.blog.title} in fluid.
> 
> good catch. Of course the TCA of the "entries" field of the blog also 
> must be changed to reflect this. So also drop the MM table relation here 
> and use foreign_field (IRRE) etc.

Hi,

made a mistake. I tried to explain my problem with a wrong example.
Obvisually a Post doesn't belong to different blogs. Bad example.

I'd better talked about customers odering products... :-)

Sorry. The goal was to understand how to handle the mm-relations in a 
clean way.

Thanks for your help, guys!
Mario


More information about the TYPO3-project-typo3v4mvc mailing list