[TYPO3-mvc] Definitive state of MM-relational-queries in Extbase
Felix Oertel
mehl at foertel.com
Tue Apr 13 23:36:18 CEST 2010
Hi,
Am 13.04.10 11:22, schrieb Mario Beiser:
> I have a blog model, a post model and a relational table blog_post_mm.
>
> No I want to show the name of the according blog in the list of my
> posts. Therefore I can use the "dot"-syntax? Not quite sure about how to
> handle that.
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.
regards, foertel
More information about the TYPO3-project-typo3v4mvc
mailing list