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.
filter.sub()
1 parent ea9aca1 commit d418c20Copy full SHA for d418c20
src/core/database/query/filters.ts
@@ -234,7 +234,11 @@ export const sub =
234
sub
235
.apply(matchSubNode)
236
.apply(subBuilder()(value))
237
- .return(`true as ${key}FiltersApplied`),
+ .return(`true as ${key}FiltersApplied`)
238
+ // Prevent filter from increasing cardinality above 1.
239
+ // This happens with `1-Many` relationships matched in `matchSubNode`.
240
+ // Note they are allowed to reduce cardinality to 0.
241
+ .raw('limit 1'),
242
)
243
.with('*');
244
0 commit comments