You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've read all the docs, checked the search function for the issues on Github but I can't seem to find a good example for my following use-case. I'm sure this is quite common but I can't get it to work. It's practically equal to (docs) but in my case I want all the users that do not belong to a specific match. The other way around works. models.ts
/// This doesn't work
export const observePersonsNotInMatch = (matchID: string) =>
database.collections
.get("persons")
.query(
Q.on("persons_matches", "match_id", Q.notEq(matchID)) // Changing this to Q.eq(matchID) returns the persons in the match, so why not vice versa?
)
.observe();
/// This works
export const observePersonsNotInMatch = (matchID: string) =>
database.collections
.get("persons")
.query(
Q.unsafeSqlQuery(
`SELECT p.*
FROM persons p
LEFT JOIN persons_matches pm ON p.id = pm.person_id AND pm.match_id = '${matchID}'
WHERE pm.match_id IS NULL;`,
),
)
.observe();
The text was updated successfully, but these errors were encountered:
I've read all the docs, checked the search function for the issues on Github but I can't seem to find a good example for my following use-case. I'm sure this is quite common but I can't get it to work. It's practically equal to (docs) but in my case I want all the users that do not belong to a specific match. The other way around works.
models.ts
helper.ts
The text was updated successfully, but these errors were encountered: