We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01c8a3b commit 6229c18Copy full SHA for 6229c18
.changeset/yellow-wolves-invent.md
@@ -0,0 +1,5 @@
1
+---
2
+"mikro-orm-find-dataloader": patch
3
4
+
5
+fix: collection filtering condition
packages/find/src/findDataloader.ts
@@ -490,7 +490,9 @@ export function getFindBatchLoadFn<Entity extends object>(
490
} else {
491
// Our current filter is an object
492
if (entityValue instanceof Collection) {
493
- entityValue.find((entity) => filterResult(entity, value));
+ if (!entityValue.getItems().some((entity) => filterResult(entity, value))) {
494
+ return false;
495
+ }
496
} else if (!filterResult(entityValue as object, value)) {
497
return false;
498
}
0 commit comments