diff --git a/lib/DB/Place/PlaceMapper.php b/lib/DB/Place/PlaceMapper.php index ba8213c59..77a271e4a 100644 --- a/lib/DB/Place/PlaceMapper.php +++ b/lib/DB/Place/PlaceMapper.php @@ -62,7 +62,7 @@ public function findPlacesForUser(string $userId): array { $metadataQuery->joinIndex(self::METADATA_KEY); $rows = $qb->where($qb->expr()->eq('file.storage', $qb->createNamedParameter($storageId, IQueryBuilder::PARAM_INT))) ->andWhere($qb->expr()->in('file.mimetype', $qb->createNamedParameter($mimetypes, IQueryBuilder::PARAM_INT_ARRAY))) - ->andWhere('meta_value_string IS NOT NULL') + ->andWhere($qb->expr()->isNotNull('meta_value_string')) ->executeQuery() ->fetchAll(); @@ -87,7 +87,7 @@ public function findPlaceForUser(string $userId, string $place): PlaceInfo { $rows = $qb->where($qb->expr()->eq('file.storage', $qb->createNamedParameter($storageId, IQueryBuilder::PARAM_INT))) ->andWhere($qb->expr()->in('file.mimetype', $qb->createNamedParameter($mimetypes, IQueryBuilder::PARAM_INT_ARRAY))) ->andWhere($qb->expr()->eq('meta_value_string', $qb->createNamedParameter($place))) - ->andWhere('meta_value_string IS NOT NULL') + ->andWhere($qb->expr()->isNotNull('meta_value_string')) ->executeQuery() ->fetchAll(); @@ -116,7 +116,7 @@ public function findFilesForUserAndPlace(string $userId, string $place) { $rows = $qb->where($qb->expr()->eq('file.storage', $qb->createNamedParameter($storageId, IQueryBuilder::PARAM_INT))) ->andWhere($qb->expr()->in('file.mimetype', $qb->createNamedParameter($mimetypes, IQueryBuilder::PARAM_INT_ARRAY))) ->andWhere($qb->expr()->eq('meta_value_string', $qb->createNamedParameter($place))) - ->andWhere('meta_value_string IS NOT NULL') + ->andWhere($qb->expr()->isNotNull('meta_value_string')) ->executeQuery() ->fetchAll(); @@ -153,7 +153,7 @@ public function findFileForUserAndPlace(string $userId, string $place, string $f ->andWhere($qb->expr()->eq('file.name', $qb->createNamedParameter($fileName))) ->andWhere($qb->expr()->in('file.mimetype', $qb->createNamedParameter($mimetypes, IQueryBuilder::PARAM_INT_ARRAY))) ->andWhere($qb->expr()->eq('meta_value_string', $qb->createNamedParameter($place))) - ->andWhere('meta_value_string IS NOT NULL') + ->andWhere($qb->expr()->isNotNull('meta_value_string')) ->executeQuery() ->fetchAll();