#107556Relation of StaticSelectFieldType is not set correctly in ColumnMapFactory
Description
If a field is configured as a static many-to-many relation in TCA, TYPO3 13 no longer handles it correctly in the method \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMapFactory::setRelations(). As a result, typeOfRelation is marked as Relation::NONE instead of Relation::HAS_MANY. This leads to the following error in \TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser::parseComparison():
“Unsupported or non-existing property name “location” used in relation matching.”
Steps to reproduce:
1. Define a TCA field with a static select (many-to-many) configuration:
'location' => [
'exclude' => 1,
'label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xlf:fe_users.location',
'config' => [
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
'items' => [
['label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xlf:fe_users.location.I.1', 'value' => 1],
['label' => 'LLL:EXT:myext/Resources/Private/Language/locallang_db.xlf:fe_users.location.I.2', 'value' => 2],
],
'maxitems' => 2,
],
],
Execute a query in an Extbase repository using contains():
$constraints[] = $query->contains('location', (int)$location);Reviews 2
Related issues 1
History 712
-
Oliver Bartsch commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2025-09-30T09:02:38+00:00" > 09/30/25, 09:02 </span> -
Gerrit Code Review pushed patch set 1 for main to change 90844 status
Needs FeedbackUnder Review <span data-processor="relativetime" data-value="2025-09-30T09:31:00+00:00" > 09/30/25, 09:31 </span> -
Gerrit Code Review pushed patch set 1 for 13.4 to change 90845 <span data-processor="relativetime" data-value="2025-09-30T09:35:06+00:00" > 09/30/25, 09:35 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 90844 <span data-processor="relativetime" data-value="2025-09-30T09:45:18+00:00" > 09/30/25, 09:45 </span>
-
Gerrit Code Review pushed patch set 2 for 13.4 to change 90845 <span data-processor="relativetime" data-value="2025-09-30T09:45:39+00:00" > 09/30/25, 09:45 </span>
-
Nikita Hovratov changed Related to #104808 <span data-processor="relativetime" data-value="2025-09-30T10:46:54+00:00" > 09/30/25, 10:46 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 90844 <span data-processor="relativetime" data-value="2025-09-30T10:50:51+00:00" > 09/30/25, 10:50 </span>
-
Oliver Bartsch commented <span data-processor="relativetime" data-value="2025-10-01T07:39:08+00:00" > 10/01/25, 07:39 </span>
Hi Gernot,
we have applied a patch for v13, see https://review.typo3.org/c/Packages/TYPO3.CMS/+/90845. Please have a look, whether this fixes your problem. Otherwise, as said in my other comment, it would be really valuable if you could provide the corresponding extbase model.
Best,
Oli -
Oliver Bartsch commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-10-01T07:40:10+00:00" > 10/01/25, 07:40 </span>Applied in changeset commit:06d3e07d1c28305440c02cbafe01de391d6f9275.
-
Gernot Leitgab commented <span data-processor="relativetime" data-value="2025-10-01T08:36:09+00:00" > 10/01/25, 08:36 </span>
Oliver Bartsch wrote in #note-1:
> Hi, thanks for your report.
>
> Could you please also provide the corresponding extbase model. This also influences the column mapping.
>
> Thanks and all the best,
> OliThe following model is used:
protected string $location = ''; public function setLocation(string $location): void { $this->location = $location; } public function getLocation(): string { return $this->location; } public function setLocationArray(array $locationArray): void { $this->location = implode(',', $locationArray); } public function getLocationArray(): array { return GeneralUtility::intExplode(',', $this->location, true); } -
Gernot Leitgab commented <span data-processor="relativetime" data-value="2025-10-01T08:38:10+00:00" > 10/01/25, 08:38 </span>
Oliver Bartsch wrote in #note-8:
> Hi Gernot,
>
> we have applied a patch for v13, see https://review.typo3.org/c/Packages/TYPO3.CMS/+/90845. Please have a look, whether this fixes your problem. Otherwise, as said in my other comment, it would be really valuable if you could provide the corresponding extbase model.
>
> Best,
> OliThank you for providing a patch for v13!
With your patch applied the above mentioned error is gone and the repository returns the appropriate objects.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T13:04:40+00:00" > 12/02/25, 13:04 </span>
Hi, thanks for your report.
Could you please also provide the corresponding extbase model. This also influences the column mapping.
Thanks and all the best,
Oli