Typo3 输入3查询条件';在';按mm关系
我有打字错误3版本7.6.18 我有一个“会议”模型 在DB表中,我有“category_type”字段,该字段只能值0或1,因为它与其他表相关 我尝试创建查询条件Typo3 输入3查询条件';在';按mm关系,typo3,Typo3,我有打字错误3版本7.6.18 我有一个“会议”模型 在DB表中,我有“category_type”字段,该字段只能值0或1,因为它与其他表相关 我尝试创建查询条件 $query->in('categoryType', array(0 => 2)); 2-它是关系表中对象的uid(类别\类型) 但它不起作用。 但下一个代码是有效的: $query->in('categoryType', array(0 => 1)); 所以问题是它并没有使用mm关系objectStor
$query->in('categoryType', array(0 => 2));
2-它是关系表中对象的uid(类别\类型)
但它不起作用。
但下一个代码是有效的:
$query->in('categoryType', array(0 => 1));
所以问题是它并没有使用mm关系objectStorage,它只是检查“categorytype”字段
模拟“会议”
/**
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Istar\Femeeting\Domain\Model\CategoryType>
*/
protected $categoryType = 0;
/**
* Returns the categoryType
*
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Istar\Femeeting\Domain\Model\CategoryType> $categoryType
*
*/
public function getCategoryType()
{
return $this->categoryType;
}
/**
* Sets the categoryType
*
* @param $categoryType
* @return void
*/
public function setCategoryType($categoryType)
{
$this->categoryType = $categoryType;
}
'category_type' => array(
'label' => 'LLL:EXT:femeeting/Resources/Private/Language/locallang_db.xlf:categoryType',
'config' => array(
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
'foreign_table' => 'tx_femeeting_domain_model_categorytype',
'MM' => 'tx_femeeting_domain_model_categorytype_mm',
'foreign_table_where' => 'AND tx_femeeting_domain_model_categorytype.sys_language_uid=###REC_FIELD_sys_language_uid### ',
'maxitems' => '50',
'multiple' => 1,
),
),
我希望你能理解我的问题。我真的需要帮助(有可能达到这种条件吗?我需要它获得[2,4,5]中“meeting.category_type”的会议。meeting.category_type-这是对象存储。谢谢你的建议!请原谅)我没有注意)
$query->in('categoryType.uid',$categories);“uid”-这是个问题