Skip to content

Commit

Permalink
Searched values in resource titles too.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Berthereau authored and Daniel Berthereau committed Jan 3, 2022
1 parent 30dadca commit 7e4ad10
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions application/src/Api/Adapter/AbstractResourceEntityAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,14 @@ protected function buildPropertyQuery(QueryBuilder $qb, array $query)
continue 2;
}
$param = $this->createNamedParameter($qb, $list);
$subqueryAlias = $this->createAlias();
$subquery = $this->getEntityManager()
->createQueryBuilder()
->select("$subqueryAlias.id")
->from('Omeka\Entity\Resource', $subqueryAlias)
->where($qb->expr()->eq("$subqueryAlias.title", $param));
$predicateExpr = $qb->expr()->orX(
$qb->expr()->in("$valuesAlias.valueResource", $subquery->getDQL()),
$qb->expr()->in("$valuesAlias.value", $param),
$qb->expr()->in("$valuesAlias.uri", $param)
);
Expand Down

0 comments on commit 7e4ad10

Please sign in to comment.