[TYPO3-dev] Accessing MM relations "from both sides"?
Rudy Gnodde
gnodde.rudy at wag.nl
Thu Aug 17 11:52:25 CEST 2006
Hello Mario,
Take a look at the Bidirectional M-M relations extension.
http://typo3.org/extensions/repository/view/bidirectional/1.1.0/
Regards,
Rudy Gnodde
WIND Internet
http://www.windinternet.nl
> -----Oorspronkelijk bericht-----
> Van: typo3-dev-bounces at lists.netfielders.de
> [mailto:typo3-dev-bounces at lists.netfielders.de] Namens Mario Rimann
> Verzonden: donderdag 17 augustus 2006 11:34
> Aan: typo3-dev at lists.netfielders.de
> Onderwerp: [TYPO3-dev] Accessing MM relations "from both sides"?
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all
>
> I have an extension that holds group (team) and person
> (teammember) records. Until now, it was just possible to
> assign groups to a person record via an MM-table.
>
> Then I worked with that extension for the first time with
> *many* persons, and found it would be much more comfortable
> to have the possibility to assign persons to group records
> (using the same MM-table
> - - but vice-versa).
>
> For that I added a new field to the group record and the
> according TCA definition. That's what happens if I add the
> same person (uid=2) to the same group (uid=3) - once via the
> person's record and once via the group
> record:
>
> mysql> SELECT *
> -> FROM `tx_bzdstaffdirectory_persons_usergroups_mm` ;
> +-----------+-------------+------------+---------+
> | uid_local | uid_foreign | tablenames | sorting |
> +-----------+-------------+------------+---------+
> | 2 | 3 | | 1 |
> | 3 | 2 | | 1 |
> +-----------+-------------+------------+---------+
> 2 rows in set (0.00 sec)
>
> It's just inverted - that's the problem. First I tried it
> with the person with uid=3 - of course it worked. That's all.
>
> My search brought up an older post (that is not answered yet):
> http://lists.netfielders.de/pipermail/typo3-english/2005-Janua
> ry/000007.html
>
> Is there a solution? Something like a "invertForeignAndLocalTable"
> switch for the TCA definition of the groups table?
>
> Cheers,
> Mario
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFE5DgM5yAXgAWej3wRAtYhAJ0ffjygCglQktA9SaZXTo4P/f6OMQCfbbTb
> Tp1XqH5hKO0XPnyI6k8EtdM=
> =MVqp
> -----END PGP SIGNATURE-----
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
>
More information about the TYPO3-dev
mailing list