[TYPO3-mvc] Bidirectional mm

Henjo Hoeksma me at henjohoeksma.nl
Tue May 29 09:18:54 CEST 2012


Hi Kast,

delete from the Frontend or the Backend?

Kind regards,

Henjo

Problems are small because we learned how to deal with them.
Problems are big because we need to learn how to deal with them.


On Mon, May 28, 2012 at 2:18 AM, kestutis <kestutis1a at gmail.com> wrote:

> Hello,
>
> I would like to relate two objects A and B from two different tables with
> mm table.
> When A is removed relationship to B in mm table should be removed.
> When B is removed relationship to A in mm table should be removed.
> Here I would like to manipulate objects without using IRRE, but in Extbase
> model(attach)
>
> In a blog example there is tx_blogexample_post_post_mm table for related
> posts.
>
> <...>
>                'related_posts' => array(
>                        'exclude' => 1,
>                        'label' => 'LLL:EXT:blog_example/**
> Resources/Private/Language/**locallang_db.xml:tx_**
> blogexample_domain_model_post.**related',
>                        'config' => array(
>                                'type' => 'select',
>                                'size' => 10,
>                                'maxitems' => 9999,
>                                'autoSizeMax' => 30,
>                                'multiple' => 0,
>                                'foreign_table' =>
> 'tx_blogexample_domain_model_**post',
>                                'foreign_table_where' => 'AND
> ###THIS_UID### != tx_blogexample_domain_model_**post.uid',
>                                'MM' => 'tx_blogexample_post_post_mm',
>                                'MM_opposite_field' => 'related_posts',
>                        )
>                ),
> <...>
>
>
> When I delete a related post, relationship in a
> tx_blogexample_post_post_mm table remains.
> Is it possible to configure TCA in a such way, that removing the object
> will remove a relationship in mm table?
>
>
> Thank you in advance,
> Kast
> ______________________________**_________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc@**lists.typo3.org<TYPO3-project-typo3v4mvc at lists.typo3.org>
> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**
> project-typo3v4mvc<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc>
>


More information about the TYPO3-project-typo3v4mvc mailing list