Filter by id of the related resource
See original GitHub issueHello,
I have a resource X, which has 1-to-many relationship to resource Y. I try to get only that ones of type X, which are related to Y with certain id. Filtering with
http://$host:8080/ui-api/X?include=Y&filter[X][Y.id]=id
delivers no entries. Debugging showed to me, that the filter is trying to access the related objects Collection, and at the filtering moment the related objects are not loaded from their ids.
Is it possible to use for filtering just the ids from the @JsonApiRelationId
Collection, without loading all related objects?
Thanks Best regards Andre
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
List and filter your resources - Amazon Elastic Compute Cloud
Filter resources using the console · In the navigation pane, select a resource type (for example, Instances). · Choose the search field. ·...
Read more >Filtering the Output by Resource ID - Informatica Documentation
You can enter a resource ID to select output data by key values. The resource ID is the key that you selected when...
Read more >REST API: resource needs to be filtered by ID, but no ID ...
The $filter querystring parameter allows clients to filter a collection of resources that are addressed by a request URL.
Read more >To Filter Users By ID - MuleSoft Help Center
To Filter Users By ID. I want to filer the get result by ID. Is it possible in Any-point Platform ? Below is...
Read more >Enable Service Resource Filtering - Salesforce Help
Use the Filter by Resource IDs attribute on relevant flow pages to specify a comma-separated list of service resource IDs. Salesforce Scheduler limits...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There is
InMemoryEvaluator.getPRoperty
which looks up the value for a given attribute path. What you suggest is already implemented. However, for this to work in needs access to the ResourceRegistry. This can be done by creating theInMemoryEvaluator
manually rather than simply usingQuerySpec.apply
. There is a simple heuristic in place in case of a missing ResourceRegistry. Would also be a possiblity to make that one a bit more advanced by looking for @JsonApiRelation and @JsonApiId annotations.Thanks, I’ll check it!