Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Extbase
Target version:
Start date:
2014-08-29
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

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

Actions #1

Updated by Gerrit Code Review about 10 years ago

  • 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

Actions #2

Updated by Alexander Opitz about 10 years ago

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? ;)

Actions #3

Updated by Frans Saris about 10 years ago

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 :) ).

Actions #4

Updated by Alexander Opitz about 10 years ago

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.

Actions #5

Updated by Gerrit Code Review about 10 years ago

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

Actions #6

Updated by Frans Saris about 10 years ago

@alex done

Actions #7

Updated by Gerrit Code Review about 10 years ago

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

Actions #8

Updated by Gerrit Code Review about 10 years ago

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

Actions #9

Updated by Tymoteusz Motylewski about 10 years ago

How can I test patch /reproduce the problem?

Actions #10

Updated by Frans Saris about 10 years ago

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.

Actions #11

Updated by Gerrit Code Review about 10 years ago

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

Actions #12

Updated by Gerrit Code Review about 10 years ago

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

Actions #13

Updated by Gerrit Code Review about 10 years ago

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

Actions #14

Updated by Frans Saris about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #15

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF