fix(medusa): Custom repository take/skip when called without relations (#2962)

**What**
The actual behavior is that the skip/take is applied in a first query returning the correct number of results. When there is no relations, we are calling findByIds with the previously retrieved ids, but we also pass skip/take which means that no result are returned after the first increment of the skip.

The skip/take should not be applied in that case as it has already been applied.

FIXES CORE-970
This commit is contained in:
Adrien de Peretti authored and GitHub committed 2023-01-09 09:54:25 +00:00
1 parent b280e53bd3
commit e4af968531
4 files changed
+53 -12

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
fix: Custom repository take/skip wrongly applied when there is no relations in the findWihtRelationAndCount