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