[TYPO3-dev] bidirectional mm relation via TCA

stefano cecere scecere at krur.com
Sat Jan 21 11:36:59 CET 2006


hi Franz, and thanks.. but i didn't get your point...
i have to tell the "foreign" table TCA, to use the _mm table in "reversing" the uid_local and uid_foreign values!

example:
table tx_myext_a linked to table tx_myext_b by table tx_myext_a_b_mm

TCA for tx_myext_a:
"link_to_b" => Array (		
	"config" => Array (
		"type" => "group",	
		"internal_type" => "db",	
		"allowed" => "tx_myext_b",
		"size" => 5,	
		"maxitems" => 100,	
		"MM" => "tx_myext_a_b_mm",
	)
),

TCA for b:
"link_to_a" => Array (		
	"config" => Array (
		"type" => "group",	
		"internal_type" => "db",	
		"allowed" => "tx_myext_a",
		"size" => 5,	
		"maxitems" => 100,	
		"MM" => "tx_myext_a_b_mm",
	)
),

you see.. a->b works
b->a doesn't works well (the values are inverted because b should use uid_foreign as locals!

stefano



Franz Holzinger wrote:
> Hello stefano,
>> i'm linking two tables via mm relationship
>>
>> i can edit the relations from one table, with simple group TCA
>>
>> since the relations is bi-directional.. could it be possible to edit the
>> relations from the "foreign" table TCA?
>> i didn't find any hint about it..
>> maybe i should develop my own wizard?
>>
> You can use a group field as well on your foreign table TCA to select
> the elements of your one table. So you have to edit this in the backend
> of your foreign table.




More information about the TYPO3-dev mailing list