Skip to content

Commit 4ef8529

Browse files
committed
fix: Update findByIds method to use get() instead of find() for correct query execution
1 parent 3469179 commit 4ef8529

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/Services/ContentService.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ public function __construct()
2828
/** {@inheritDoc} */
2929
public function findByIds($ids, $isWebPage = null, $isPublished = null, $withRelations = [], $sorting = [], $limit = 10)
3030
{
31-
return $this->buildFindByIdsQuery($ids, $isWebPage, $isPublished, $withRelations, $sorting, $limit)
32-
->find($ids);
31+
return $this->buildFindByIdsQuery($ids, $isWebPage, $isPublished, $withRelations, $sorting, $limit)->get();
3332
}
3433

3534
public function findByRoutePatternWithLangId($uri, $isDefaultRoutePattern, $isWebPage = null, $isPublished = null, $withRelations = [], $sorting = [], $limit = 10)
@@ -310,7 +309,7 @@ private function buildFindByIdsQuery($ids, $isWebPage = null, $isPublished = nul
310309
]);
311310
$query = $this->applySortingAndLimit($query, $sorting, $limit);
312311

313-
return $query;
312+
return $query->whereKey($ids);
314313
}
315314

316315
private function buildFindByRealPathQuery($path, $isWebPage = null, $isPublished = null, $withRelations = [], $sorting = [], $limit = null)

0 commit comments

Comments
 (0)