Feature: Filter/Having on included collections #1586
johannes-z
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As of now,
includescannot be filtered upon. You need a sub-query with a join to filter.For example, given the official example that lists projects and issues in a single createLiveQueryCollection, you cannot filter out projects that do not have issues.
If I want to filter projects without issues, I have to do this:
I'm not aware of a cleaner/shorter way to write this. It would be nice if we could use
.fn.havingor.fn.whereon the the included collection, for example:The subquery workaround works, but it's wordy, especially with bigger queries. Additionally, all materialized collections need a unique name (
issueRefinstead ofissuein the example above). For bigger queries this gets super wordy.Beta Was this translation helpful? Give feedback.
All reactions