I'm using Typo3 version 8.7.8 and I'm developing an extention. The two tables "auftrag" and "verstorbener" are connectet with a 1:n relation. I try to search for a field in the table "verstorbener" in the repository of "auftrag". The relation of both is necessary.
If I try to execute the following query I get the error "The ColumnMap for property "verstorbener" of class "...\Auftrag" is missing."
$name = "Mustermann";
$query->matching(
$query->logicalAnd(
$query->equals('verstorbener.nachname', $name)
)
);
How can I solve this problem? If you need more input feel free to ask for it.
Edit -- The relevant TCA code of the field "verst_id" in "auftrag" which contains the UID of "verstorbener":
'verst_id' => [
'exclude' => true,
'label' => 'LLL:EXT:.../locallang_db.xlf:auftrag.verst_id',
'config' => [
'type' => 'inline',
'foreign_table' => 'verstorbener',
'foreign_field' => 'uid',
'minitems' => 0,
'maxitems' => 1,
'appearance' => [
'collapseAll' => 0,
'levelLinksPosition' => 'top',
'showSynchronizationLink' => 1,
'showPossibleLocalizationRecords' => 1,
'showAllLocalizationLink' => 1
],
],
],
Edit -- This is the object model
/**
* verstId
*
* @var \...\Domain\Model\Verstorbener
*/
protected $verstId = null;
/**
* Returns the verstId
*
* @return \...\Domain\Model\Verstorbener $verstId
*/
public function getVerstId()
{
return $this->verstId;
}
/**
* Sets the verstId
*
* @param \...\Domain\Model\Verstorbener $verstId
* @return void
*/
public function setVerstId(\...\Domain\Model\Verstorbener $verstId)
{
$this->verstId = $verstId;
}