Bug #61268
closed
Updating MM releations doesn't respect tablenames and fieldname fields
Added by Frans Saris about 10 years ago.
Updated about 6 years ago.
Description
When updating existing linked objects the fields tablenames and fieldname are not respected.
As result:
UPDATE
sys_category_record_mm
SET
sorting_foreign='1', tablenames='tx_eventsmanager_domain_model_event', fieldname='categories
WHERE
uid_foreign=21 AND uid_local=91 AND tablenames='tx_eventsmanager_domain_model_event'
is executed instead of
UPDATE
sys_category_record_mm
SET
sorting_foreign='1'
WHERE
uid_foreign=21 AND uid_local=91 AND tablenames='tx_eventsmanager_domain_model_event' AND tablenames='tx_eventsmanager_domain_model_event' AND fieldname='categories
This breaks existing mm releations
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32505
Hi Frans, after reading the code, may it be that your written SQL Statements aren't correct? Or am I wrong and need to take a deeper look? ;)
Please have a look at the patch, think you get the point then.
Could be that I made a mistake in the SQL above (was no real cut/paste work :) ).
Ok, so you did make a mistake ... but I get the point.
Can we also fix the docblock of the updateRelationInRelationTable function in TYPO3\CMS\Extbase\Persistence\Generic\Backend which uses the code path this patch is fixing? The docblock seams a Copy&Paste from Insert.
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32505
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32505
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32505
How can I test patch /reproduce the problem?
Add extra categories to an existing extbase object with already a category assigned.
Best to have 2 or more different object types (with same uids) with same categories assigned and have a look at all set relations after you added more categories to one of the objects.
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32505
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32505
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32673
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF