[TYPO3-mvc] Cannot update mm-relation (missing tablenames)

Franz Koch typo3.RemoveForMessage at elements-net.de
Mon Nov 15 01:53:03 CET 2010


Hey there,

>> When i now add relations on the backend the value of tablenames is set to tx_specialoffersmvc_domain_model_portal from both sides. When i now add a relation with extbase all my relations are overwritten and the value for tablenames becomes tx_specialoffersmvc_domain_model_item like the code suggest:
>>
>> $row[$columnMap->getRelationTableRelatedTableColumnName()] = $columnMap->getChildTableName();
>>
>> I tried to get the tablename from MM_match_fields:
>>
>> if ($columnMap->getRelationTableRelatedTableColumnName() !== NULL&&  $columnMap->getChildTableName() !== NULL&&  array_key_exists($columnMap->getRelationTableRelatedTableColumnName(), $columnMap->getRelationTableMatchFields())) {
>>                         $arrayMatchFields = $columnMap->getRelationTableMatchFields();
>>                         $row[$columnMap->getRelationTableRelatedTableColumnName()] = $arrayMatchFields[$columnMap->getRelationTableRelatedTableColumnName()];
>> 		}
>>
>> I can see in my sql log that the relation is inserted correct but after that a delete query removes it.
>>
>> Do you have an idea why this happens or maybe you have a better approach.
>>
>> It's late now and i will continue tomorrow with this issue, also with increase and decrease the other side of the relation when mm_opposite_field is set.

I think the issue has to be addressed in the dataMapFactory. Some time 
ago I messed with matchFields and MM_opposite stuff to integrate support 
for fields of TCA type "group". I you like you could test attached patch 
which implements that TCA type and also fixes some other issues I came 
across with this, but please not that this is experimental code and 
subject to change before getting implemented in extbase.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list