[TYPO3-dev] Possible bug: Relations with MM_opposite_field don't update the relation count of opposite field
Steffen Kamper
info at sk-typo3.de
Fri Aug 13 18:38:52 CEST 2010
Hi,
it's quite a time ago, anyway i'm pleasured with this configuration:
CREATE TABLE tx_e3_mm (
uid_local int(11) DEFAULT '0' NOT NULL,
uid_foreign int(11) DEFAULT '0' NOT NULL,
tablenames varchar(80) DEFAULT '' NOT NULL,
ident varchar(80) DEFAULT '' NOT NULL,
sorting int(11) DEFAULT '0' NOT NULL,
sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,
KEY uid_local (uid_local),
KEY uid_foreign (uid_foreign)
);
$TCA['tx_e3_elements'] = array (
'columns' => array (
'dossier' => array (
'exclude' => 0,
'label' => 'LLL:EXT:e3/locallang_db.xml:tx_e3_elements.dossier',
'config' => array (
'type' => 'select',
'foreign_table' => 'tx_e3_dossiers',
'foreign_table_where' => 'ORDER BY tx_e3_dossiers.title',
'size' => 1,
'minitems' => 0,
'maxitems' => 1,
'MM' => 'tx_e3_mm',
'MM_match_fields' => array(
'tablenames' => 'tx_e3_dossiers',
'ident' => 'tx_e3_elements',
),
)
),
the interesting part is the MM_match_fields. With this configuration, i
can share the mm table with all tables of my extension, and all is
updated by core in the correct way. And it's always
ident = local table
tablenames = foreign_table
hope this helps.
vg Steffen
More information about the TYPO3-dev
mailing list