Skip to content

Resource Embedding - Enable filtering on a parent table of an embedded child tables properties #1956

Answered by wolfgangwalther
a-mckinley asked this question in Q&A
Discussion options

You must be logged in to vote

I only skimmed your post so far, but maybe you're just missing the correct filter here:

    &child_config.name=eq.property 1

Because you're using nested embedding, I think this should be:

    &child.child_config.name=eq.property 1

I'm not sure whether that's actually documented, yet, but there are test-cases that suggest this should work:

it "matches filtering nested items" $
get "/clients?select=id,projects(id,tasks(id,name))&projects.tasks.name=like.Design*" `shouldRespondWith`
[json|[{"id":1,"projects":[{"id":1,"tasks":[{"id":1,"name":"Design w7"}]},{"id":2,"tasks":[{"id":3,"name":"Design w10"}]}]},…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by wolfgangwalther
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #1954 on September 20, 2021 11:01.