Skip to content

Deeply nested top-filter fails when wrapped in a "or" #3726

Answered by laurenceisla
noobmaster19 asked this question in Q&A
Discussion options

You must be logged in to vote

What you want to do is an OR filtering across embedded resources, although for deeply nested resources.

You should change your query to something like:

curl ...
  -d "select=*,qc:quotationCustomers(q:quotation()),quotationCustomers(quotation!inner(associated_personnel_ids))" \
  # Edit: I made a mistake here, it should be `=` instead of `.`
  -d "qc.q.associated_personnel_ids=cs.%7B1456f47e-62d5-4ecb-92aa-5922ee576086%7D" \
  -d "or=(created_by.eq.1456f47e-62d5-4ecb-92aa-5922ee576086,qc.not.is.null)"

The empty embed (the one that has the qc and q aliases) is used for filtering and the other one is used to get the data. Check these discussions for more info: #3333, #3663

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@noobmaster19
Comment options

@noobmaster19
Comment options

@laurenceisla
Comment options

Answer selected by wolfgangwalther
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3725 on September 16, 2024 16:16.