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

Kevin Ulrich Moschallski km at 3digit.de
Mon Nov 15 10:41:25 CET 2010


Hi Franz,

thanks for your reply. I'm looking forward to test your patch, but there's no attachment. Maybe the list cuts attachments or properly you forgot to attach it. Could you please (re-)post it as attachment or as a link, thanks.

Regards,

Kevin

Am 15.11.2010 um 01:53 schrieb Franz Koch:

> 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
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list