瀏覽代碼

filter

develop
Charly 3 年之前
父節點
當前提交
ba3e33b0ea
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      Field/Filter/AssociationFilter.php

+ 2
- 2
Field/Filter/AssociationFilter.php 查看文件

@@ -57,9 +57,9 @@ class AssociationFilter
public function applyFilter(RepositoryQueryInterface $repositoryQuery, FieldDto $fieldDto, $filteredValue = null)
{
$fieldProperty = $this->getFieldProperty($fieldDto);
if ($filteredValue !== null) {

if ($fieldDto->getFormTypeOption('multiple')) {
if ($filteredValue !== null) {
if ($fieldDto->getFormTypeOption('multiple') || ($fieldDto->getTemplatePath() != null && str_contains($fieldDto->getTemplatePath(), 'association_many'))) {
$repositoryQuery->andWhere(':' . $fieldProperty . ' MEMBER OF .' . $fieldProperty . '');
} else {
$repositoryQuery->andWhere('.' . $fieldProperty . ' = :' . $fieldProperty . '');

Loading…
取消
儲存