OR with a mix of root and embedded resources #3333
-
Hi |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hello! To do an OR across embedded resources you need to use
We added Try it out and let us know if it worked. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much Laurence ! |
Beta Was this translation helpful? Give feedback.
Hello! To do an OR across embedded resources you need to use
not.is.null
for the resources inside anor
. But, in your case, since you want to filter the top resourcesuppliers
with an embedded resource, you don't need to usenot.is.null
for the top one. In other words, in your first example, to add anOR code = %myword%
to thetypes.or=
filter, you need to do this:We added
&or=(code.ilike.*myword*,types.not.is.null)
. This means that PostgREST will get all thesuppliers
that havecode.ilike.*myword*
OR those where the embeddedtypes
is not null, that …