Fetch all records with entries that do not exist in a join table #2704
-
Hey, I have a set of tables, say table I tried I know that in SQL we can use Would be great if anyone has any suggestions on how to approach this. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi! I think what you need here is the ANTI JOIN mentioned here: #2584 (comment) . In your case, the query would be: GET /users?select=*,users_projects()&users_projects=is.null Also, if the GET /users?select=*,projects()&projects=is.null This is available in the latest pre-release. |
Beta Was this translation helpful? Give feedback.
Hi! I think what you need here is the ANTI JOIN mentioned here: #2584 (comment) . In your case, the query would be:
Also, if the
users_projects
table references both foreign keys and has them as a composite PK like you mentioned, then you can get the same result embeddingprojects
directly:This is available in the latest pre-release.