I've a requirement in my custom extension where there are records, lets say which are projects saved in table name: tx_myextension_domain_model_projects
and which are categorized using custom category table tx_myextension_domain_model_categories
the relation which is mapped in model is m:n and saved in mm table tx_myextension_category_record_mm
.
This is the TCA mapping for the category field:
products_category' => [
'exclude' => true,
'label' => 'Category Label',
'config' => [
'type' => 'select',
'renderType' => 'selectTree',
'foreign_table' => 'tx_myextension_domain_model_categories',
'foreign_table_where' => 'ORDER BY tx_myextension_domain_model_categories.sorting',
'MM' => 'tx_myextension_category_record_mm',
'MM_match_fields' => [
'tablenames' => 'tx_myextension_domain_model_projects',
],
'MM_opposite_field' => 'items',
'size' => 20,
'treeConfig' => [
'parentField' => 'parent',
'appearance' => [
'showHeader' => true,
'expandAll' => true,
'maxLevels' => 99,
],
],
],
],
So in one of my use cases I need to get the projects which are categorized with disabled and active categories.
For example this is the categories :
categories = [
A => [
A1 => [
A1.2
]
A2 => [
A2.2
]
],
B => [
B1 => [
B1.2
]
],
];
Lets say A1
is disabled/hidden record and I want to get the projects which are assigned to A1
and its child A1.2
. Is there any possibilities to get the project records using TYPO3 Repository query.
Note: I couldn't disable the enable fields using $querySettings->setIgnoreEnableFields(true);
because I don't want to disable it for the entire repository of category and also I need to disable it from the Project repository while query the project records. I hope my question is clear. Please let me know the solution for this.
Solution Currently I choosed: I used TYPO3 Connection Pool Query instead of repository query.